mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-13 17:00:19 +00:00
Merge pull request #1609 from cesanta/mqtt-over-ws-client
Added openSSL support
This commit is contained in:
2 files changed
+9
-8
No files matched your search
@@ -1,10 +1,12 @@
|
|||||||
PROG ?= example
|
PROG ?= example
|
||||||
MBEDTLS_DIR ?=
|
SSL = ?
|
||||||
|
|
||||||
ifeq "$(MBEDTLS_DIR)" ""
|
ifeq "$(SSL)" "MBEDTLS"
|
||||||
else
|
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509
|
||||||
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -I$(MBEDTLS_DIR)/include -I/usr/include
|
endif
|
||||||
CFLAGS += -L$(MBEDTLS_DIR)/lib -lmbedtls -lmbedcrypto -lmbedx509
|
|
||||||
|
ifeq "$(SSL)" "OPENSSL"
|
||||||
|
CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: $(PROG)
|
all: $(PROG)
|
||||||
@@ -12,7 +14,7 @@ all: $(PROG)
|
|||||||
|
|
||||||
|
|
||||||
$(PROG): main.c
|
$(PROG): main.c
|
||||||
$(CC) ../../mongoose.c -I../.. -W -Wall $(CFLAGS) -o $(PROG) main.c
|
$(CC) ../../mongoose.c -I../.. -W -Wall $(CFLAGS) $(EXTRA_CFLAGS) -o $(PROG) main.c
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb
|
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb
|
||||||
@@ -7,8 +7,7 @@
|
|||||||
// 3. Publishes message `hello` to the `s_topic`
|
// 3. Publishes message `hello` to the `s_topic`
|
||||||
// 4. Receives that message back from the subscribed topic and exits
|
// 4. Receives that message back from the subscribed topic and exits
|
||||||
//
|
//
|
||||||
// To enable SSL/TLS for this client, build it like this:
|
// To enable SSL/TLS, make SSL=OPENSSL or make SSL=MBEDTLS
|
||||||
// make MBEDTLS_DIR=/path/to/your/mbedtls/installation
|
|
||||||
|
|
||||||
#include "mongoose.h"
|
#include "mongoose.h"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user