-@@ -1628,6 +1632,10 @@ int php_openssl_setup_crypto(php_stream *stream,
- ssl_ctx_options = SSL_OP_ALL;
- #endif
+@@ -1686,6 +1690,10 @@ int php_openssl_setup_crypto(php_stream
+ method = sslsock->is_client ? SSLv23_client_method() : SSLv23_server_method();
+ sslsock->ctx = SSL_CTX_new(method);