[PATCH] SSL: guard use of SSLEAY_VERSION_NUMBER
Piotr Sikora
piotr at cloudflare.com
Thu Jun 18 10:39:34 UTC 2015
# HG changeset patch
# User Piotr Sikora <piotr at cloudflare.com>
# Date 1434623802 25200
# Thu Jun 18 03:36:42 2015 -0700
# Node ID 4e0b02f89144cd774e213458c1d8f71b59ace1f9
# Parent c3ec43580a48114dfd28186f43e773fcfe211337
SSL: guard use of SSLEAY_VERSION_NUMBER.
It has been removed from BoringSSL, which isn't versioned anyway.
OPENSSL_VERSION_TEXT can be used to print "built with BoringSSL".
Signed-off-by: Piotr Sikora <piotr at cloudflare.com>
diff -r c3ec43580a48 -r 4e0b02f89144 src/core/nginx.c
--- a/src/core/nginx.c Wed Jun 17 17:57:34 2015 +0300
+++ b/src/core/nginx.c Thu Jun 18 03:36:42 2015 -0700
@@ -233,16 +233,22 @@ main(int argc, char *const *argv)
#endif
#if (NGX_SSL)
- if (SSLeay() == SSLEAY_VERSION_NUMBER) {
- ngx_write_stderr("built with " OPENSSL_VERSION_TEXT
- NGX_LINEFEED);
- } else {
+
+#ifdef SSLEAY_VERSION_NUMBER
+ if (SSLeay() != SSLEAY_VERSION_NUMBER) {
ngx_write_stderr("built with " OPENSSL_VERSION_TEXT
" (running with ");
ngx_write_stderr((char *) (uintptr_t)
SSLeay_version(SSLEAY_VERSION));
ngx_write_stderr(")" NGX_LINEFEED);
+
+ } else
+#endif
+ {
+ ngx_write_stderr("built with " OPENSSL_VERSION_TEXT
+ NGX_LINEFEED);
}
+
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
ngx_write_stderr("TLS SNI support enabled" NGX_LINEFEED);
#else
More information about the nginx-devel
mailing list