com php-src: Bug #67850: Build when OpenSSL compiled without SSLv3 support: ext/openssl/xp_ssl.c
| From: | rdlowrey@php.net | Date: | Mon, 25 Aug 2014 15:28:09 +0000 |
| Subject: | com php-src: Bug #67850: Build when OpenSSL compiled without SSLv3 support: ext/openssl/xp_ssl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-80842@lists.php.net to get a copy of this message | ||
Commit: 640214701c9cf259c899d283ea769b3045d2553c
Author: Daniel Lowrey <rdlowrey@php.net> Mon, 25 Aug 2014 17:28:09 +0200
Parents: c8b3bce407e7491a4d1e345d3eeb11ce0ec1d9c4
Branches: PHP-5.5
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=640214701c9cf259c899d283ea769b3045d2553c
Log:
Bug #67850: Build when OpenSSL compiled without SSLv3 support
Bugs:
https://bugs.php.net/67850
Changed paths:
M ext/openssl/xp_ssl.c
Diff:
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index b9a30df..5fddf73 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -385,9 +385,14 @@ static inline int php_openssl_setup_crypto(php_stream *stream,
break;
#endif
case STREAM_CRYPTO_METHOD_SSLv3_CLIENT:
+#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 -1;
+#else
sslsock->is_client = 1;
method = SSLv3_client_method();
break;
+#endif
case STREAM_CRYPTO_METHOD_TLS_CLIENT:
sslsock->is_client = 1;
method = TLSv1_client_method();
@@ -397,9 +402,14 @@ static inline int php_openssl_setup_crypto(php_stream *stream,
method = SSLv23_server_method();
break;
case STREAM_CRYPTO_METHOD_SSLv3_SERVER:
+#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 -1;
+#else
sslsock->is_client = 0;
method = SSLv3_server_method();
break;
+#endif
case STREAM_CRYPTO_METHOD_SSLv2_SERVER:
#ifdef OPENSSL_NO_SSL2
php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSLv2 support is not compiled into the OpenSSL
library PHP is linked against");