summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSamuel Henrique <samueloph@debian.org>2022-09-01 22:32:49 +0100
committerDaniel Stenberg <daniel@haxx.se>2022-09-04 15:57:12 +0200
commit7d69924ce773f13c175e56ad1b20b0d5dac224b9 (patch)
tree64fc4d1e76c57e3efed5856fda716a9405e92d27 /configure.ac
parent9178208a8e5ed3792d4d5a6dc021abcca971d098 (diff)
downloadcurl-7d69924ce773f13c175e56ad1b20b0d5dac224b9.tar.gz
configure: fail if '--without-ssl' + explicit parameter for an ssl lib
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
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 30c881f3f..1f299d4cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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)