]>
Commit | Line | Data |
---|---|---|
fcc49ef5 ER |
1 | --- php-5.2.17/ext/openssl/xp_ssl.c 2010-04-23 16:32:03.000000000 +0300 |
2 | +++ php-5.3.29/ext/openssl/xp_ssl.c 2014-08-13 22:22:50.000000000 +0300 | |
3 | @@ -333,9 +329,14 @@ | |
4 | method = SSLv23_client_method(); | |
5 | break; | |
6 | case STREAM_CRYPTO_METHOD_SSLv2_CLIENT: | |
7 | +#ifdef OPENSSL_NO_SSL2 | |
8 | + php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSLv2 support is not compiled into the OpenSSL library PHP is linked against"); | |
9 | + return -1; | |
10 | +#else | |
11 | sslsock->is_client = 1; | |
12 | method = SSLv2_client_method(); | |
13 | break; | |
14 | +#endif | |
15 | case STREAM_CRYPTO_METHOD_SSLv3_CLIENT: | |
16 | sslsock->is_client = 1; | |
17 | method = SSLv3_client_method(); | |
18 | @@ -353,9 +354,14 @@ | |
19 | method = SSLv3_server_method(); | |
20 | break; | |
21 | case STREAM_CRYPTO_METHOD_SSLv2_SERVER: | |
22 | +#ifdef OPENSSL_NO_SSL2 | |
23 | + php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSLv2 support is not compiled into the OpenSSL library PHP is linked against"); | |
24 | + return -1; | |
25 | +#else | |
26 | sslsock->is_client = 0; | |
27 | method = SSLv2_server_method(); | |
28 | break; | |
29 | +#endif | |
30 | case STREAM_CRYPTO_METHOD_TLS_SERVER: | |
31 | sslsock->is_client = 0; | |
32 | method = TLSv1_server_method(); | |
33 | @@ -813,8 +922,13 @@ | |
34 | sslsock->enable_on_connect = 1; | |
35 | sslsock->method = STREAM_CRYPTO_METHOD_SSLv23_CLIENT; | |
36 | } else if (strncmp(proto, "sslv2", protolen) == 0) { | |
37 | +#ifdef OPENSSL_NO_SSL2 | |
38 | + php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSLv2 support is not compiled into the OpenSSL library PHP is linked against"); | |
39 | + return NULL; | |
40 | +#else | |
41 | sslsock->enable_on_connect = 1; | |
42 | sslsock->method = STREAM_CRYPTO_METHOD_SSLv2_CLIENT; | |
43 | +#endif | |
44 | } else if (strncmp(proto, "sslv3", protolen) == 0) { | |
45 | sslsock->enable_on_connect = 1; | |
46 | sslsock->method = STREAM_CRYPTO_METHOD_SSLv3_CLIENT; |