diff src/event/ngx_event_openssl_stapling.c @ 7736:a46fcf101cfc

Core: added format specifiers to output binary data as hex. Now "s", "V", and "v" format specifiers may be prefixed with "x" (lowercase) or "X" (uppercase) to output corresponding data in hexadecimal format. In collaboration with Maxim Dounin.
author Vladimir Homutov <vl@nginx.com>
date Wed, 28 Oct 2020 10:56:11 +0300
parents d752a2c76d49
children ee40e2b1d083
line wrap: on
line diff
--- a/src/event/ngx_event_openssl_stapling.c
+++ b/src/event/ngx_event_openssl_stapling.c
@@ -2662,16 +2662,8 @@ ngx_ssl_ocsp_create_key(ngx_ssl_ocsp_ctx
     p = ngx_cpymem(p, serial->data, serial->length);
     ngx_memzero(p, 20 - serial->length);
 
-#if (NGX_DEBUG)
-    {
-        u_char  buf[120];
-
-        ngx_hex_dump(buf, ctx->key.data, ctx->key.len);
-
-        ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ctx->log, 0,
-                       "ssl ocsp key %*s", sizeof(buf), buf);
-    }
-#endif
+    ngx_log_debug1(NGX_LOG_DEBUG_EVENT, ctx->log, 0,
+                   "ssl ocsp key %xV", &ctx->key);
 
     return NGX_OK;
 }