libcurl: add wolfssl as an option for TLS
authorJulien Grossholtz <julien.grossholtz@openest.io>
Tue, 5 Nov 2019 10:06:59 +0000 (11:06 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Tue, 31 Dec 2019 16:24:34 +0000 (17:24 +0100)
Libcurl recipe allows selecting between various TLS backends. Users can
already select between several options but WolfSSL was missing. WolfSSL
is an efficient TLS library, it supports TLS 1.3 and is used in many
embedded systems.

Add WolfSSL to libcurl "SSL/TLS library to use" choice list when WolfSSL
package is enabled. When selected in the list, use libcurl
--with-wolfssl configure option. Explicitly set --without-wolfssl
when it is not selected.

Signed-off-by: Julien Grossholtz <julien.grossholtz@openest.io>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/libcurl/Config.in
package/libcurl/libcurl.mk

index 0511786dc6e5f5405b01a749a3f2e2a0d6ccb13a..3a9ee0f1213866f0e69317368baf97a6ad38eeff 100644 (file)
@@ -51,6 +51,7 @@ config BR2_PACKAGE_LIBCURL_TLS_SUPPORT
        default y if BR2_PACKAGE_GNUTLS
        default y if BR2_PACKAGE_LIBNSS
        default y if BR2_PACKAGE_MBEDTLS
+       default y if BR2_PACKAGE_WOLFSSL
 
 choice
        prompt "SSL/TLS library to use"
@@ -72,6 +73,10 @@ config BR2_PACKAGE_LIBCURL_MBEDTLS
        bool "mbed TLS"
        depends on BR2_PACKAGE_MBEDTLS
 
+config BR2_PACKAGE_LIBCURL_WOLFSSL
+       bool "WolfSSL"
+       depends on BR2_PACKAGE_WOLFSSL
+
 endchoice
 
 comment "A TLS library is needed for SSL/TLS support"
index 373befae130b51221f1d5889c99f9015a430a303..d46b874b3759e08a01ecf3fdafa966629a89c68b 100644 (file)
@@ -74,6 +74,13 @@ else
 LIBCURL_CONF_OPTS += --without-mbedtls
 endif
 
+ifeq ($(BR2_PACKAGE_LIBCURL_WOLFSSL),y)
+LIBCURL_CONF_OPTS += --with-wolfssl=$(STAGING_DIR)/usr
+LIBCURL_DEPENDENCIES += wolfssl
+else
+LIBCURL_CONF_OPTS += --without-wolfssl
+endif
+
 ifeq ($(BR2_PACKAGE_C_ARES),y)
 LIBCURL_DEPENDENCIES += c-ares
 LIBCURL_CONF_OPTS += --enable-ares