]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
wolfssl: detect when TLS 1.2 support is not built into wolfssl
authorDerzsi Dániel <daniel@tohka.us>
Sun, 16 Jul 2023 10:20:23 +0000 (10:20 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 16 Jul 2023 21:28:57 +0000 (23:28 +0200)
Closes #11444

lib/vtls/wolfssl.c

index 1fe173b0ec759e1843559be56f7664f2e19be91b..d66a270c040d9262a4933ef594962e7fe6ad52ba 100644 (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