php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #54736
Patch compile-without-curl.txt revision 2011-05-17 12:57 UTC by bobvin at pillars dot net
Patch compile-with-curl.txt revision 2011-05-17 12:56 UTC by bobvin at pillars dot net
Patch debian_patches_disable_SSLv2_for_openssl_1_0_0.patch revision 2011-05-14 23:09 UTC by bobvin at pillars dot net

Patch debian_patches_disable_SSLv2_for_openssl_1_0_0.patch for OpenSSL related Bug #54736

Patch version 2011-05-14 23:09 UTC

Return to Bug #54736 | Download this patch
Patch Revisions:

Developer: bobvin@pillars.net

--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -328,10 +328,12 @@ static inline int php_openssl_setup_cryp
 			sslsock->is_client = 1;
 			method = SSLv23_client_method();
 			break;
+#ifndef OPENSSL_NO_SSL2
 		case STREAM_CRYPTO_METHOD_SSLv2_CLIENT:
 			sslsock->is_client = 1;
 			method = SSLv2_client_method();
 			break;
+#endif
 		case STREAM_CRYPTO_METHOD_SSLv3_CLIENT:
 			sslsock->is_client = 1;
 			method = SSLv3_client_method();
@@ -348,10 +350,12 @@ static inline int php_openssl_setup_cryp
 			sslsock->is_client = 0;
 			method = SSLv3_server_method();
 			break;
+#ifndef OPENSSL_NO_SSL2
 		case STREAM_CRYPTO_METHOD_SSLv2_SERVER:
 			sslsock->is_client = 0;
 			method = SSLv2_server_method();
 			break;
+#endif
 		case STREAM_CRYPTO_METHOD_TLS_SERVER:
 			sslsock->is_client = 0;
 			method = TLSv1_server_method();
@@ -629,9 +633,11 @@ static inline int php_openssl_tcp_sockop
 				case STREAM_CRYPTO_METHOD_SSLv23_CLIENT:
 					sock->method = STREAM_CRYPTO_METHOD_SSLv23_SERVER;
 					break;
+#ifndef OPENSSL_NO_SSL2
 				case STREAM_CRYPTO_METHOD_SSLv2_CLIENT:
 					sock->method = STREAM_CRYPTO_METHOD_SSLv2_SERVER;
 					break;
+#endif
 				case STREAM_CRYPTO_METHOD_SSLv3_CLIENT:
 					sock->method = STREAM_CRYPTO_METHOD_SSLv3_SERVER;
 					break;
@@ -911,9 +917,11 @@ php_stream *php_openssl_ssl_socket_facto
 	if (strncmp(proto, "ssl", protolen) == 0) {
 		sslsock->enable_on_connect = 1;
 		sslsock->method = STREAM_CRYPTO_METHOD_SSLv23_CLIENT;
+#ifndef OPENSSL_NO_SSL2
 	} else if (strncmp(proto, "sslv2", protolen) == 0) {
 		sslsock->enable_on_connect = 1;
 		sslsock->method = STREAM_CRYPTO_METHOD_SSLv2_CLIENT;
+#endif
 	} else if (strncmp(proto, "sslv3", protolen) == 0) {
 		sslsock->enable_on_connect = 1;
 		sslsock->method = STREAM_CRYPTO_METHOD_SSLv3_CLIENT;
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sat May 27 02:01:36 2017 UTC