diff options
| author | Rasmus Lerdorf <rasmus@php.net> | 2011-04-24 23:27:48 +0000 |
|---|---|---|
| committer | Rasmus Lerdorf <rasmus@php.net> | 2011-04-24 23:27:48 +0000 |
| commit | 380c3e5127abc3e55d01b89eb92cf6264f85449f (patch) | |
| tree | 34fcd4471832b07b972ba9a079a9a19e032b5050 /ext/openssl/xp_ssl.c | |
| parent | 6336b280196ba759029709d6aca364f16c5c3747 (diff) | |
| download | php-git-380c3e5127abc3e55d01b89eb92cf6264f85449f.tar.gz | |
SSLV2 patch cleanup
Diffstat (limited to 'ext/openssl/xp_ssl.c')
| -rw-r--r-- | ext/openssl/xp_ssl.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index efff50625f..f3efe91245 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -330,8 +330,8 @@ static inline int php_openssl_setup_crypto(php_stream *stream, break; case STREAM_CRYPTO_METHOD_SSLv2_CLIENT: #ifdef OPENSSL_NO_SSL2 - php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSLv2 support is not compiled in openSSL"); - return -1; + php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSLv2 support is not compiled into the openSSL library PHP is linked against"); + return -1; #else sslsock->is_client = 1; method = SSLv2_client_method(); @@ -355,8 +355,8 @@ static inline int php_openssl_setup_crypto(php_stream *stream, break; case STREAM_CRYPTO_METHOD_SSLv2_SERVER: #ifdef OPENSSL_NO_SSL2 - php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSLv2 support is not compiled in openSSL"); - return -1; + php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSLv2 support is not compiled into the openSSL library PHP is linked against"); + return -1; #else sslsock->is_client = 0; method = SSLv2_server_method(); @@ -922,8 +922,13 @@ php_stream *php_openssl_ssl_socket_factory(const char *proto, long protolen, sslsock->enable_on_connect = 1; sslsock->method = STREAM_CRYPTO_METHOD_SSLv23_CLIENT; } else if (strncmp(proto, "sslv2", protolen) == 0) { +#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"); + return NULL; +#else 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; |
