From dd8130406e832b76b2c8fbcdacca4ddf3c18db11 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Tue, 11 Apr 2023 16:34:01 +0200 Subject: connect: fix https connection setup to treat ssl_mode correctly - for HTTPS protocol, a disabled ssl should never be acceptables. Closes #10934 --- lib/connect.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/connect.c') diff --git a/lib/connect.c b/lib/connect.c index 7624794cf..87f5b2ed1 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -1409,9 +1409,8 @@ CURLcode Curl_conn_setup(struct Curl_easy *data, #if !defined(CURL_DISABLE_HTTP) && !defined(USE_HYPER) if(!conn->cfilter[sockindex] && - conn->handler->protocol == CURLPROTO_HTTPS && - (ssl_mode == CURL_CF_SSL_ENABLE || ssl_mode != CURL_CF_SSL_DISABLE)) { - + conn->handler->protocol == CURLPROTO_HTTPS) { + DEBUGASSERT(ssl_mode != CURL_CF_SSL_DISABLE); result = Curl_cf_https_setup(data, conn, sockindex, remotehost); if(result) goto out; -- cgit v1.2.1