package/mongoose: add mbedtls support
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sun, 13 Dec 2020 09:52:15 +0000 (10:52 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Sun, 13 Dec 2020 21:47:10 +0000 (22:47 +0100)
mbedtls is supported since version 6.7 and
https://github.com/cesanta/mongoose/commit/65e01dbabc1f458af5ad8984f6eb5cb01ebae284

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/mongoose/mongoose.mk

index 87f56d789471ea82a9b707e97ec3970c1a318229..5faeafb374020cb7ca1076c89addb0fa83b77acb 100644 (file)
@@ -16,7 +16,14 @@ MONGOOSE_CFLAGS = $(TARGET_CFLAGS)
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 MONGOOSE_DEPENDENCIES += openssl
-MONGOOSE_CFLAGS += -DMG_ENABLE_SSL
+MONGOOSE_CFLAGS += \
+       -DMG_ENABLE_SSL \
+       -DMG_SSL_IF=MG_SSL_IF_OPENSSL
+else ifeq ($(BR2_PACKAGE_MBEDTLS),y)
+MONGOOSE_DEPENDENCIES += mbedtls
+MONGOOSE_CFLAGS += \
+       -DMG_ENABLE_SSL \
+       -DMG_SSL_IF=MG_SSL_IF_MBEDTLS
 endif
 
 define MONGOOSE_BUILD_CMDS