Commit c66b0b32 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

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
parent 2064ea96
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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)