mirror of
https://github.com/php/php-src.git
synced 2024-09-23 19:07:26 +00:00
Support for openssl without SSLv2 supprot compiled in. Distros are starting to
remove support now and this wasn't compiling anymore on my Debian dev box.
This commit is contained in:
parent
21f71027e3
commit
e575557612
@ -329,9 +329,14 @@ static inline int php_openssl_setup_crypto(php_stream *stream,
|
||||
method = SSLv23_client_method();
|
||||
break;
|
||||
case STREAM_CRYPTO_METHOD_SSLv2_CLIENT:
|
||||
#ifdef OPENSSL_NO_SSL2
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSLv2 support is not compiled in openSSL");
|
||||
return -1;
|
||||
#else
|
||||
sslsock->is_client = 1;
|
||||
method = SSLv2_client_method();
|
||||
break;
|
||||
#endif
|
||||
case STREAM_CRYPTO_METHOD_SSLv3_CLIENT:
|
||||
sslsock->is_client = 1;
|
||||
method = SSLv3_client_method();
|
||||
@ -349,9 +354,14 @@ static inline int php_openssl_setup_crypto(php_stream *stream,
|
||||
method = SSLv3_server_method();
|
||||
break;
|
||||
case STREAM_CRYPTO_METHOD_SSLv2_SERVER:
|
||||
#ifdef OPENSSL_NO_SSL2
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSLv2 support is not compiled in openSSL");
|
||||
return -1;
|
||||
#else
|
||||
sslsock->is_client = 0;
|
||||
method = SSLv2_server_method();
|
||||
break;
|
||||
#endif
|
||||
case STREAM_CRYPTO_METHOD_TLS_SERVER:
|
||||
sslsock->is_client = 0;
|
||||
method = TLSv1_server_method();
|
||||
|
Loading…
Reference in New Issue
Block a user