aboutsummaryrefslogtreecommitdiff
path: root/src/core/nginx.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2016-03-31 23:38:38 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2016-03-31 23:38:38 +0300
commit2e251b1c342370b8b3365cf30eca2cf61d9ef559 (patch)
tree98c4a58e196f1b278e33bde0e4e35f7e1714b75f /src/core/nginx.c
parentd8fbce1deb24a174f327786684f862cc39b5ac0a (diff)
downloadnginx-2e251b1c342370b8b3365cf30eca2cf61d9ef559.tar.gz
nginx-2e251b1c342370b8b3365cf30eca2cf61d9ef559.zip
SSL: SSLeay_version() is deprecated in OpenSSL 1.1.0.
SSLeay_version() and SSLeay() are no longer available if OPENSSL_API_COMPAT is set to 0x10100000L. Switched to using OpenSSL_version() instead. Additionally, we now compare version strings instead of version numbers, and this correctly works for LibreSSL as well.
Diffstat (limited to 'src/core/nginx.c')
-rw-r--r--src/core/nginx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c
index e69acb571..60f8fe7d4 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -413,13 +413,12 @@ ngx_show_version_info(void)
#endif
#if (NGX_SSL)
- if (SSLeay() == SSLEAY_VERSION_NUMBER) {
+ if (ngx_strcmp(ngx_ssl_version(), OPENSSL_VERSION_TEXT) == 0) {
ngx_write_stderr("built with " OPENSSL_VERSION_TEXT NGX_LINEFEED);
} else {
ngx_write_stderr("built with " OPENSSL_VERSION_TEXT
" (running with ");
- ngx_write_stderr((char *) (uintptr_t)
- SSLeay_version(SSLEAY_VERSION));
+ ngx_write_stderr((char *) (uintptr_t) ngx_ssl_version());
ngx_write_stderr(")" NGX_LINEFEED);
}
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME