summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2015-04-16 12:17:41 +0300
committerVladimir Homutov <vl@nginx.com>2015-04-16 12:17:41 +0300
commitfd4da8922851cf5b7ada71ac18d54c9fe5be520a (patch)
tree5429a29a38e4bc785b60f33b48e61fca7cc650dd
parent513f184098cba76f6f5f473e05834406a9a2322f (diff)
downloadnginx-fd4da8922851cf5b7ada71ac18d54c9fe5be520a.tar.gz
Core: added OpenSSL version information to "nginx -V" output.
-rw-r--r--src/core/nginx.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c
index feb861a11..86ebe4188 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -248,18 +248,29 @@ main(int argc, char *const *argv)
}
if (ngx_show_configure) {
- ngx_write_stderr(
+
#ifdef NGX_COMPILER
- "built by " NGX_COMPILER NGX_LINEFEED
+ ngx_write_stderr("built by " NGX_COMPILER NGX_LINEFEED);
#endif
+
#if (NGX_SSL)
+ if (SSLeay() == SSLEAY_VERSION_NUMBER) {
+ 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 *) SSLeay_version(SSLEAY_VERSION));
+ ngx_write_stderr(")" NGX_LINEFEED);
+ }
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
- "TLS SNI support enabled" NGX_LINEFEED
+ ngx_write_stderr("TLS SNI support enabled" NGX_LINEFEED);
#else
- "TLS SNI support disabled" NGX_LINEFEED
+ ngx_write_stderr("TLS SNI support disabled" NGX_LINEFEED);
#endif
#endif
- "configure arguments:" NGX_CONFIGURE NGX_LINEFEED);
+
+ ngx_write_stderr("configure arguments:" NGX_CONFIGURE NGX_LINEFEED);
}
if (!ngx_test_config) {