mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Bastian Krause <bst@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Bastian Krause <bst@pengutronix.de>
Subject: [ptxdist] [PATCH 1/2] libcurl: allow choice between OpenSSL and GnuTLS backend
Date: Tue,  8 Jun 2021 17:53:28 +0200	[thread overview]
Message-ID: <20210608155329.14346-1-bst@pengutronix.de> (raw)

Signed-off-by: Bastian Krause <bst@pengutronix.de>
---
 rules/libcurl.in   | 20 +++++++++++++++++++-
 rules/libcurl.make |  6 +++---
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/rules/libcurl.in b/rules/libcurl.in
index 390e495ca..632ed48e4 100644
--- a/rules/libcurl.in
+++ b/rules/libcurl.in
@@ -5,7 +5,8 @@ menuconfig LIBCURL
 	prompt "libcurl                       "
 	select LIBC_RT
 	select ZLIB
-	select OPENSSL		if LIBCURL_SSL
+	select OPENSSL		if LIBCURL_SSL_OPENSSL
+	select GNUTLS		if LIBCURL_SSL_GNUTLS
 	select LIBSSH2		if LIBCURL_LIBSSH2
 	select CA_CERTIFICATES	if LIBCURL_SSL_CA_CERTIFICATES && RUNTIME
 	select C_ARES		if LIBCURL_C_ARES
@@ -58,6 +59,17 @@ config LIBCURL_SSL
 
 if LIBCURL_SSL
 
+choice
+	prompt "SSL backend"
+	default LIBCURL_SSL_OPENSSL
+
+	config LIBCURL_SSL_OPENSSL
+		bool "OpenSSL"
+
+	config LIBCURL_SSL_GNUTLS
+		bool "GnuTLS"
+endchoice
+
 choice
 	prompt "Central CA certificate storage"
 	
@@ -81,6 +93,12 @@ config LIBCURL_SSL_CA_CERTIFICATES_PATH
 
 endif
 
+config LIBCURL_SSL_DEFAULT_BACKEND
+	string
+	default "openssl"	if LIBCURL_SSL_OPENSSL
+	default "gnutls"	if LIBCURL_SSL_GNUTLS
+	default "no"		if !LIBCURL_SSL
+
 config LIBCURL_SSL_CAPATH_PATH
 	string "CA directory path" if LIBCURL_SSL_CAPATH
 	default "/etc/ssl/certs" if LIBCURL_SSL_CAPATH || (LIBCURL_SSL_CA_CERTIFICATES && LIBCURL_SSL_CA_CERTIFICATES_PATH)
diff --git a/rules/libcurl.make b/rules/libcurl.make
index 5620ba276..7a915dce3 100644
--- a/rules/libcurl.make
+++ b/rules/libcurl.make
@@ -89,15 +89,15 @@ LIBCURL_CONF_OPT	:= \
 	--without-brotli \
 	--without-zstd \
 	--without-gssapi \
-	--with-default-ssl-backend=$(call ptx/ifdef, PTXCONF_LIBCURL_SSL,openssl,no) \
+	--with-default-ssl-backend=$(PTXCONF_LIBCURL_SSL_DEFAULT_BACKEND) \
 	--without-winssl \
 	--without-schannel \
 	--without-darwinssl \
 	--without-secure-transport \
 	--without-amissl \
-	--with-ssl=$(call ptx/ifdef, PTXCONF_LIBCURL_SSL,$(SYSROOT)/usr,no) \
+	--with-ssl=$(call ptx/ifdef, PTXCONF_LIBCURL_SSL_OPENSSL,$(SYSROOT)/usr,no) \
 	--with-random=/dev/urandom \
-	--without-gnutls \
+	--with-gnutls=$(call ptx/ifdef, PTXCONF_LIBCURL_SSL_GNUTLS,$(SYSROOT)/usr,no) \
 	--without-mbedtls \
 	--without-wolfssl \
 	--without-mesalink \
-- 
2.29.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


             reply	other threads:[~2021-06-08 15:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08 15:53 Bastian Krause [this message]
2021-06-08 15:53 ` [ptxdist] [PATCH 2/2] libcurl: version bump 7.72.0 -> 7.77.0 Bastian Krause
2021-06-08 15:58   ` Bastian Krause
2021-06-16 10:35   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-06-08 16:31 ` [ptxdist] [PATCH 1/2] libcurl: allow choice between OpenSSL and GnuTLS backend Roland Hieber
2021-06-08 16:37   ` Bastian Krause
2021-06-16 10:35 ` [ptxdist] [APPLIED] " Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210608155329.14346-1-bst@pengutronix.de \
    --to=bst@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox