File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -723,7 +723,7 @@ struct url_conn_match {
723723 BIT (want_proxy_ntlm_http );
724724 BIT (want_nego_http );
725725 BIT (want_proxy_nego_http );
726-
726+ BIT ( req_tls ); /* require TLS use from a clear-text start */
727727 BIT (wait_pipe );
728728 BIT (force_reuse );
729729 BIT (seen_pending_conn );
@@ -875,6 +875,9 @@ static bool url_match_ssl_use(struct connectdata *conn,
875875 (get_protocol_family (conn -> scheme ) != m -> needle -> scheme -> protocol ))
876876 return FALSE;
877877 }
878+ else if (m -> req_tls )
879+ /* a clear-text STARTTLS protocol with required TLS */
880+ return FALSE;
878881 return TRUE;
879882}
880883
@@ -1333,6 +1336,7 @@ static bool url_attach_existing(struct Curl_easy *data,
13331336 (needle -> scheme -> protocol & PROTO_FAMILY_HTTP );
13341337#endif
13351338#endif
1339+ match .req_tls = data -> set .use_ssl >= CURLUSESSL_CONTROL ;
13361340
13371341 /* Find a connection in the pool that matches what "data + needle"
13381342 * requires. If a suitable candidate is found, it is attached to "data". */
You can’t perform that action at this time.
0 commit comments