]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: fail if '--without-ssl' + explicit parameter for an ssl lib
authorSamuel Henrique <samueloph@debian.org>
Thu, 1 Sep 2022 21:32:49 +0000 (22:32 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 4 Sep 2022 13:57:12 +0000 (15:57 +0200)
A side effect of a previous change to configure (576e507c78bdd2ec88)
exposed a non-critical issue that can happen if configure is called with
both '--without-ssl' and some parameter setting the use of a ssl library
(e.g. --with-gnutls). The configure script would end up assuming this is
a MultiSSL build, due to the way the case statement is written.

I have changed the order of the variables in the string concatenation
for the case statement and also tweaked the options so that
--without-ssl never turns the build into a MultiSSL one and also clearly
stating that there are conflicting parameters if the user sets it like
described above.

Closes #9414

configure.ac

index 30c881f3fc809655ea42b2a45d5887547e508328..1f299d4cd84bcacb74cb2410697dca6762a537b2 100644 (file)
@@ -1957,7 +1957,7 @@ if test "x$curl_cv_native_windows" = "xyes" &&
   LIBS="-lbcrypt $LIBS"
 fi
 
-case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$BEARSSL_ENABLED$RUSTLS_ENABLED$SSL_DISABLED"
+case "x$SSL_DISABLED$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$BEARSSL_ENABLED$RUSTLS_ENABLED"
 in
 x)
   AC_MSG_ERROR([TLS not detected, you will not be able to use HTTPS, FTPS, NTLM and more.
@@ -1972,6 +1972,11 @@ x1)
 xD)
   # explicitly built without TLS
   ;;
+xD*)
+  AC_MSG_ERROR([--without-ssl has been set together with an explicit option to use an ssl library
+(e.g. --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl, --with-rustls).
+Since these are conflicting parameters, verify which is the desired one and drop the other.])
+  ;;
 *)
   # more than one SSL backend is enabled
   AC_SUBST(SSL_ENABLED)