[nginx] Core: added OpenSSL version information to "nginx -V" ou...

Vladimir Homutov vl at nginx.com
Thu Apr 16 09:19:45 UTC 2015


details:   http://hg.nginx.org/nginx/rev/8b7f062a3fe6
branches:  
changeset: 6097:8b7f062a3fe6
user:      Vladimir Homutov <vl at nginx.com>
date:      Thu Apr 16 12:17:41 2015 +0300
description:
Core: added OpenSSL version information to "nginx -V" output.

diffstat:

 src/core/nginx.c |  21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r e24f1bfdb641 -r 8b7f062a3fe6 src/core/nginx.c
--- a/src/core/nginx.c	Thu Apr 16 12:13:51 2015 +0300
+++ b/src/core/nginx.c	Thu Apr 16 12:17:41 2015 +0300
@@ -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) {



More information about the nginx-devel mailing list