summaryrefslogtreecommitdiff
path: root/ext/openssl/xp_ssl.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-06-18 14:20:23 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-06-18 14:21:53 +0200
commit51e3cb39160cb3b7eb0e38562f253f39990a16e7 (patch)
tree8686b102b81e2842da9eb0bc600aaaa259a651fc /ext/openssl/xp_ssl.c
parentb281493503401a2b5c45c11fcd0498d8448998c2 (diff)
downloadphp-git-51e3cb39160cb3b7eb0e38562f253f39990a16e7.tar.gz
Don't generate spurious warning is security_level not supported
People should not have to worry about the used openssl version when downgrading security_level.
Diffstat (limited to 'ext/openssl/xp_ssl.c')
-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
}