summaryrefslogtreecommitdiff
path: root/ext/openssl/xp_ssl.c
diff options
context:
space:
mode:
authorDaniel Lowrey <rdlowrey@php.net>2014-08-25 18:16:38 +0200
committerDaniel Lowrey <rdlowrey@php.net>2014-08-25 18:16:38 +0200
commit546a32e2b3e73f6e812c2a61fe8de6fbdc1def58 (patch)
tree812d2a17ebb02d91c6717a855212b1940980ad51 /ext/openssl/xp_ssl.c
parent6e87b01e95e559a1b83417d8a08d2ef51b58c5ee (diff)
parent640214701c9cf259c899d283ea769b3045d2553c (diff)
downloadphp-git-546a32e2b3e73f6e812c2a61fe8de6fbdc1def58.tar.gz
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: Bug #67850: Build when OpenSSL compiled without SSLv3 support Conflicts: ext/openssl/xp_ssl.c
Diffstat (limited to 'ext/openssl/xp_ssl.c')
-rw-r--r--ext/openssl/xp_ssl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index 16516e5c09..0a85d77aaa 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -902,7 +902,13 @@ static const SSL_METHOD *php_select_crypto_method(long method_value, int is_clie
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) {
@@ -2293,8 +2299,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);