OpenSSL: no-sslv2 aware

Allow openSSL without SSL2 to be used. This fix is inspired by the fix
provided by Cristian Rodrguez.

Reported by: Cristian Rodrguez
This commit is contained in:
Daniel Stenberg 2011-04-10 19:14:22 +02:00
parent 2064ea9612
commit c66b0b32fb
1 changed files with 5 additions and 0 deletions

View File

@ -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)