mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
Merge branch 'PHP-5.6'
* PHP-5.6: Bug #67850: Build when OpenSSL compiled without SSLv3 support
This commit is contained in:
commit
cc487e6cdf
@ -891,7 +891,13 @@ static const SSL_METHOD *php_select_crypto_method(php_int_t method_value, int is
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (method_value == STREAM_CRYPTO_METHOD_SSLv3) {
|
||||
#ifndef OPENSSL_NO_SSL3
|
||||
return is_client ? SSLv3_client_method() : SSLv3_server_method();
|
||||
#else
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING,
|
||||
"SSLv3 support is not compiled into the OpenSSL library PHP is linked against");
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (method_value == STREAM_CRYPTO_METHOD_TLSv1_0) {
|
||||
return is_client ? TLSv1_client_method() : TLSv1_server_method();
|
||||
} else if (method_value == STREAM_CRYPTO_METHOD_TLSv1_1) {
|
||||
@ -2262,8 +2268,13 @@ php_stream *php_openssl_ssl_socket_factory(const char *proto, size_t protolen,
|
||||
sslsock->method = STREAM_CRYPTO_METHOD_SSLv2_CLIENT;
|
||||
#endif
|
||||
} else if (strncmp(proto, "sslv3", protolen) == 0) {
|
||||
#ifdef OPENSSL_NO_SSL3
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSLv3 support is not compiled into the OpenSSL library PHP is linked against");
|
||||
return NULL;
|
||||
#else
|
||||
sslsock->enable_on_connect = 1;
|
||||
sslsock->method = STREAM_CRYPTO_METHOD_SSLv3_CLIENT;
|
||||
#endif
|
||||
} else if (strncmp(proto, "tls", protolen) == 0) {
|
||||
sslsock->enable_on_connect = 1;
|
||||
sslsock->method = get_crypto_method(context, STREAM_CRYPTO_METHOD_TLS_CLIENT);
|
||||
|
Loading…
Reference in New Issue
Block a user