File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -329,9 +329,14 @@ static inline int php_openssl_setup_crypto(php_stream *stream,
329
329
method = SSLv23_client_method ();
330
330
break ;
331
331
case STREAM_CRYPTO_METHOD_SSLv2_CLIENT :
332
+ #ifdef OPENSSL_NO_SSL2
333
+ php_error_docref (NULL TSRMLS_CC , E_WARNING , "SSLv2 support is not compiled in openSSL" );
334
+ return -1 ;
335
+ #else
332
336
sslsock -> is_client = 1 ;
333
337
method = SSLv2_client_method ();
334
338
break ;
339
+ #endif
335
340
case STREAM_CRYPTO_METHOD_SSLv3_CLIENT :
336
341
sslsock -> is_client = 1 ;
337
342
method = SSLv3_client_method ();
@@ -349,9 +354,14 @@ static inline int php_openssl_setup_crypto(php_stream *stream,
349
354
method = SSLv3_server_method ();
350
355
break ;
351
356
case STREAM_CRYPTO_METHOD_SSLv2_SERVER :
357
+ #ifdef OPENSSL_NO_SSL2
358
+ php_error_docref (NULL TSRMLS_CC , E_WARNING , "SSLv2 support is not compiled in openSSL" );
359
+ return -1 ;
360
+ #else
352
361
sslsock -> is_client = 0 ;
353
362
method = SSLv2_server_method ();
354
363
break ;
364
+ #endif
355
365
case STREAM_CRYPTO_METHOD_TLS_SERVER :
356
366
sslsock -> is_client = 0 ;
357
367
method = TLSv1_server_method ();
You can’t perform that action at this time.
0 commit comments