diff options
author | Wez Furlong <wez@php.net> | 2004-09-10 11:43:47 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2004-09-10 11:43:47 +0000 |
commit | 0bc0ccce2b858673f59d0cb90f5bf0d037683e1f (patch) | |
tree | 059bfb2f9fca1d3d2b3248a2f239f486e3dd88dc | |
parent | f8181ba7b5a0997a7aa45e9a9ba4259e927bd90f (diff) | |
download | php-git-0bc0ccce2b858673f59d0cb90f5bf0d037683e1f.tar.gz |
Fix Bug #29296: add explicit sslv2 and sslv3 transports
-rw-r--r-- | ext/openssl/openssl.c | 2 | ||||
-rw-r--r-- | ext/openssl/xp_ssl.c | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 002fd47748..bd496b0535 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -632,6 +632,8 @@ PHP_MINIT_FUNCTION(openssl) } php_stream_xport_register("ssl", php_openssl_ssl_socket_factory TSRMLS_CC); + php_stream_xport_register("sslv3", php_openssl_ssl_socket_factory TSRMLS_CC); + php_stream_xport_register("sslv2", php_openssl_ssl_socket_factory TSRMLS_CC); php_stream_xport_register("tls", php_openssl_ssl_socket_factory TSRMLS_CC); /* override the default tcp socket provider */ diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 4171312907..9bb0fad3fe 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -691,6 +691,12 @@ php_stream *php_openssl_ssl_socket_factory(const char *proto, long protolen, if (strncmp(proto, "ssl", protolen) == 0) { sslsock->enable_on_connect = 1; sslsock->method = STREAM_CRYPTO_METHOD_SSLv23_CLIENT; + } else if (strncmp(proto, "sslv2", protolen) == 0) { + sslsock->enable_on_connect = 1; + sslsock->method = STREAM_CRYPTO_METHOD_SSLv2_CLIENT; + } else if (strncmp(proto, "sslv3", protolen) == 0) { + sslsock->enable_on_connect = 1; + sslsock->method = STREAM_CRYPTO_METHOD_SSLv3_CLIENT; } else if (strncmp(proto, "tls", protolen) == 0) { sslsock->enable_on_connect = 1; sslsock->method = STREAM_CRYPTO_METHOD_TLS_CLIENT; |