aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ssluse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index 654ffaa9f..caffdad9a 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -1456,6 +1456,10 @@ ossl_connect_step1(struct connectdata *conn,
use_sni(TRUE);
break;
case CURL_SSLVERSION_SSLv2:
+#ifdef OPENSSL_NO_SSL2
+ failf(data, "OpenSSL was built without SSLv2 support");
+ return CURLE_NOT_BUILT_IN;
+#else
#ifdef USE_TLS_SRP
if (data->set.ssl.authtype == CURL_TLSAUTH_SRP)
return CURLE_SSL_CONNECT_ERROR;
@@ -1463,6 +1467,7 @@ ossl_connect_step1(struct connectdata *conn,
req_method = SSLv2_client_method();
use_sni(FALSE);
break;
+#endif
case CURL_SSLVERSION_SSLv3:
#ifdef USE_TLS_SRP
if (data->set.ssl.authtype == CURL_TLSAUTH_SRP)