@@ -69,6 +69,10 @@ config CURL
bool
default n
+config CURL_SSL
+ bool
+ default n
+
config SYSTEMD
bool "enable systemd support"
default n
@@ -294,11 +298,29 @@ config DOWNLOAD
comment "Image downloading support needs libcurl"
depends on !HAVE_LIBCURL
+config DOWNLOAD_SSL
+ bool "Enable SSL support for image downloading"
+ default n
+ depends on DOWNLOAD
+ depends on HAVE_LIBSSL
+ depends on HAVE_LIBCRYPTO
+ select CHANNEL_CURL_SSL
+ help
+ Enable SSL and checksum verification support in channels
+ using libcurl.
+
config CHANNEL_CURL
bool
depends on HAVE_LIBCURL
select CURL
+config CHANNEL_CURL_SSL
+ bool
+ depends on CHANNEL_CURL
+ depends on HAVE_LIBSSL
+ depends on HAVE_LIBCRYPTO
+ select CURL_SSL
+
config HASH_VERIFY
bool "Allow to add sha256 hash to each image"
depends on HAVE_LIBSSL
@@ -177,6 +177,13 @@ ifeq ($(CONFIG_BOOTLOADER_EBG),y)
LDLIBS += ebgenv z
endif
+# channel_curl
+ifneq ($(CONFIG_CHANNEL_CURL_SSL),)
+ifeq ($(strip $(findstring crypto,$(LDLIBS))),)
+LDLIBS += crypto ssl
+endif
+endif
+
# suricatta
ifneq ($(CONFIG_SURICATTA),)
ifneq ($(CONFIG_SURICATTA_SSL),)
@@ -73,7 +73,7 @@ channel_t *channel_new(void);
channel_op_res_t channel_curl_init(void)
{
-#ifdef CONFIG_SURICATTA_SSL
+#if defined(CONFIG_SURICATTA_SSL) || defined(CONFIG_CHANNEL_CURL_SSL)
#define CURL_FLAGS CURL_GLOBAL_SSL
#else
#define CURL_FLAGS CURL_GLOBAL_NOTHING
@@ -15,7 +15,7 @@
* Let compile when openSSL is not activated
*/
#if defined(CONFIG_HASH_VERIFY) || defined(CONFIG_ENCRYPTED_IMAGES) || \
- defined(CONFIG_SURICATTA_SSL)
+ defined(CONFIG_SURICATTA_SSL) || defined(CONFIG_CHANNEL_CURL_SSL)
#include <openssl/bio.h>
#include <openssl/objects.h>
#include <openssl/err.h>
In order be able to initialize channel_curl with SSL support when !CONFIG_SURICATTA_SSL, introduce a cURL SSL support option and an according KConfig option. Signed-off-by: Christian Storm <christian.storm@siemens.com> --- Kconfig | 22 ++++++++++++++++++++++ Makefile.flags | 7 +++++++ corelib/channel_curl.c | 2 +- include/sslapi.h | 2 +- 4 files changed, 31 insertions(+), 2 deletions(-)