]> git.kaiwu.me - nginx.git/commitdiff
Core: added OpenSSL version information to "nginx -V" output.
authorVladimir Homutov <vl@nginx.com>
Thu, 16 Apr 2015 09:17:41 +0000 (12:17 +0300)
committerVladimir Homutov <vl@nginx.com>
Thu, 16 Apr 2015 09:17:41 +0000 (12:17 +0300)
src/core/nginx.c

index feb861a116a8ad6fd4d5e84ff2d53de83a94d8e6..86ebe4188b303bf0d0d75ae592b5b0b262f36c76 100644 (file)
@@ -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) {