]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib: error out on multissl + http3
authorDaniel Stenberg <daniel@haxx.se>
Fri, 26 Jan 2024 15:59:33 +0000 (16:59 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 29 Jan 2024 15:37:08 +0000 (16:37 +0100)
Since the QUIC/h3 code has no knowledge or handling of multissl it might
bring unintended consequences if we allow it.

configure, cmake and curl_setup.h all now reject this combination.

Assisted-by: Viktor Szakats
Assisted-by: Gisle Vanem
Ref: #12806
Closes #12807

CMakeLists.txt
configure.ac
lib/curl_setup.h

index 6c7bd56254b5c6a989acb0ae988faae80ac20a04..1b5ea67c2af69c17c50c0b63fd92fe73c8ee1f2e 100644 (file)
@@ -720,6 +720,10 @@ if(USE_MSH3)
   list(APPEND CURL_LIBS ${MSH3_LIBRARIES})
 endif()
 
+if(CURL_WITH_MULTI_SSL AND (USE_NGTCP2 OR USE_QUICHE OR USE_MSH3))
+  message(FATAL_ERROR "MultiSSL cannot be enabled with HTTP/3 and vice versa.")
+endif()
+
 if(NOT CURL_DISABLE_SRP AND (HAVE_GNUTLS_SRP OR HAVE_OPENSSL_SRP))
   set(USE_TLS_SRP 1)
 endif()
index 0737db045f04c587714f1d22a30dda33010b504d..be66be9e9df1223473dd1ec24402d6bd33673f6b 100644 (file)
@@ -4691,6 +4691,9 @@ fi
 
 if test "x$USE_NGTCP2_H3" = "x1" -o "x$USE_QUICHE" = "x1" \
     -o "x$USE_OPENSSL_H3" = "x1" -o "x$USE_MSH3" = "x1"; then
+  if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
+    AC_MSG_ERROR([MultiSSL cannot be enabled with HTTP/3 and vice versa])
+  fi
   SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP3"
 fi
 
index 91e35f58b4df77270573ac1288c88088dd6a0875..703e903fa8fc3cd41ae7bb08739d0d87b2bc2155 100644 (file)
@@ -829,6 +829,11 @@ int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf,
 #if (defined(USE_NGTCP2) && defined(USE_NGHTTP3)) || \
     (defined(USE_OPENSSL_QUIC) && defined(USE_NGHTTP3)) || \
     defined(USE_QUICHE) || defined(USE_MSH3)
+
+#ifdef CURL_WITH_MULTI_SSL
+#error "Multi-SSL combined with QUIC is not supported"
+#endif
+
 #define ENABLE_QUIC
 #define USE_HTTP3
 #endif