@@ -330,8 +330,8 @@ static inline int php_openssl_setup_crypto(php_stream *stream,
330
330
break ;
331
331
case STREAM_CRYPTO_METHOD_SSLv2_CLIENT :
332
332
#ifdef OPENSSL_NO_SSL2
333
- php_error_docref (NULL TSRMLS_CC , E_WARNING , "SSLv2 support is not compiled in openSSL" );
334
- return -1 ;
333
+ php_error_docref (NULL TSRMLS_CC , E_WARNING , "SSLv2 support is not compiled into the openSSL library PHP is linked against " );
334
+ return -1 ;
335
335
#else
336
336
sslsock -> is_client = 1 ;
337
337
method = SSLv2_client_method ();
@@ -355,8 +355,8 @@ static inline int php_openssl_setup_crypto(php_stream *stream,
355
355
break ;
356
356
case STREAM_CRYPTO_METHOD_SSLv2_SERVER :
357
357
#ifdef OPENSSL_NO_SSL2
358
- php_error_docref (NULL TSRMLS_CC , E_WARNING , "SSLv2 support is not compiled in openSSL" );
359
- return -1 ;
358
+ php_error_docref (NULL TSRMLS_CC , E_WARNING , "SSLv2 support is not compiled into the openSSL library PHP is linked against " );
359
+ return -1 ;
360
360
#else
361
361
sslsock -> is_client = 0 ;
362
362
method = SSLv2_server_method ();
@@ -922,8 +922,13 @@ php_stream *php_openssl_ssl_socket_factory(const char *proto, long protolen,
922
922
sslsock -> enable_on_connect = 1 ;
923
923
sslsock -> method = STREAM_CRYPTO_METHOD_SSLv23_CLIENT ;
924
924
} else if (strncmp (proto , "sslv2" , protolen ) == 0 ) {
925
+ #ifdef OPENSSL_NO_SSL2
926
+ php_error_docref (NULL TSRMLS_CC , E_WARNING , "SSLv2 support is not compiled into the openSSL library PHP is linked against" );
927
+ return NULL ;
928
+ #else
925
929
sslsock -> enable_on_connect = 1 ;
926
930
sslsock -> method = STREAM_CRYPTO_METHOD_SSLv2_CLIENT ;
931
+ #endif
927
932
} else if (strncmp (proto , "sslv3" , protolen ) == 0 ) {
928
933
sslsock -> enable_on_connect = 1 ;
929
934
sslsock -> method = STREAM_CRYPTO_METHOD_SSLv3_CLIENT ;
0 commit comments