summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/openssl/xp_ssl.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index 31f8ffa424..a390dcb724 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -1711,16 +1711,12 @@ int php_openssl_setup_crypto(php_stream *stream,
}
if (GET_VER_OPT("security_level")) {
-#ifdef HAVE_SEC_LEVEL
zend_long lval = zval_get_long(val);
if (lval < 0 || lval > 5) {
php_error_docref(NULL, E_WARNING, "Security level must be between 0 and 5");
}
+#ifdef HAVE_SEC_LEVEL
SSL_CTX_set_security_level(sslsock->ctx, lval);
-#else
- php_error_docref(NULL, E_WARNING,
- "security_level is not supported by the linked OpenSSL library "
- "- it is supported from version 1.1.0");
#endif
}