wolfssl: detect when TLS 1.2 support is not built into wolfssl

Closes #11444
This commit is contained in:
Derzsi Dániel 2023-07-16 10:20:23 +00:00 committed by Daniel Stenberg
parent cbe0b0e18b
commit eccf896df8
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -415,8 +415,13 @@ wolfssl_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
#endif
break;
case CURL_SSLVERSION_TLSv1_2:
#ifndef WOLFSSL_NO_TLS12
req_method = TLSv1_2_client_method();
use_sni(TRUE);
#else
failf(data, "wolfSSL does not support TLS 1.2");
return CURLE_NOT_BUILT_IN;
#endif
break;
case CURL_SSLVERSION_TLSv1_3:
#ifdef WOLFSSL_TLS13