summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2020-10-02 12:40:49 +0300
committerVladimir Homutov <vl@nginx.com>2020-10-02 12:40:49 +0300
commitd6003648872112947bdd11611ea6351aa9f5727d (patch)
tree358ce85488c8506c998d28f8b896e3374f1a2b38 /src
parent9f583efe3d77b719c142a3db9a9bfc2343e10a89 (diff)
downloadnginx-d6003648872112947bdd11611ea6351aa9f5727d.tar.gz
nginx-d6003648872112947bdd11611ea6351aa9f5727d.tar.bz2
QUIC: enabled more key-related debug by default.
Diffstat (limited to 'src')
-rw-r--r--src/event/ngx_event_quic.c15
-rw-r--r--src/event/ngx_event_quic_protection.c2
2 files changed, 13 insertions, 4 deletions
diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c
index 3aed7573c..99de10d16 100644
--- a/src/event/ngx_event_quic.c
+++ b/src/event/ngx_event_quic.c
@@ -353,9 +353,9 @@ ngx_quic_set_read_secret(ngx_ssl_conn_t *ssl_conn,
c = ngx_ssl_get_connection((ngx_ssl_conn_t *) ssl_conn);
-#ifdef NGX_QUIC_DEBUG_CRYPTO
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
"quic ngx_quic_set_read_secret() level:%d", level);
+#ifdef NGX_QUIC_DEBUG_CRYPTO
ngx_quic_hexdump(c->log, "quic read secret", rsecret, secret_len);
#endif
@@ -377,9 +377,9 @@ ngx_quic_set_write_secret(ngx_ssl_conn_t *ssl_conn,
c = ngx_ssl_get_connection((ngx_ssl_conn_t *) ssl_conn);
-#ifdef NGX_QUIC_DEBUG_CRYPTO
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
"quic ngx_quic_set_write_secret() level:%d", level);
+#ifdef NGX_QUIC_DEBUG_CRYPTO
ngx_quic_hexdump(c->log, "quic write secret", wsecret, secret_len);
#endif
@@ -403,9 +403,9 @@ ngx_quic_set_encryption_secrets(ngx_ssl_conn_t *ssl_conn,
c = ngx_ssl_get_connection((ngx_ssl_conn_t *) ssl_conn);
-#ifdef NGX_QUIC_DEBUG_CRYPTO
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
"quic ngx_quic_set_encryption_secrets() level:%d", level);
+#ifdef NGX_QUIC_DEBUG_CRYPTO
ngx_quic_hexdump(c->log, "quic read", rsecret, secret_len);
#endif
@@ -1691,6 +1691,15 @@ ngx_quic_process_packet(ngx_connection_t *c, ngx_quic_conf_t *conf,
qc = c->quic;
+#if (NGX_DEBUG)
+ ngx_quic_hexdump(c->log, "quic pkt dcid", pkt->dcid.data, pkt->dcid.len);
+
+ if (pkt->level != ssl_encryption_application) {
+ ngx_quic_hexdump(c->log, "quic pkt scid", pkt->scid.data,
+ pkt->scid.len);
+ }
+#endif
+
if (qc) {
if (rc == NGX_ABORT) {
diff --git a/src/event/ngx_event_quic_protection.c b/src/event/ngx_event_quic_protection.c
index 0bb9e8f87..450281aea 100644
--- a/src/event/ngx_event_quic_protection.c
+++ b/src/event/ngx_event_quic_protection.c
@@ -165,9 +165,9 @@ ngx_quic_set_initial_secret(ngx_pool_t *pool, ngx_quic_secret_t *client,
.len = is_len
};
-#ifdef NGX_QUIC_DEBUG_CRYPTO
ngx_log_debug0(NGX_LOG_DEBUG_EVENT, pool->log, 0,
"quic ngx_quic_set_initial_secret");
+#ifdef NGX_QUIC_DEBUG_CRYPTO
ngx_quic_hexdump(pool->log, "quic salt", salt, sizeof(salt));
ngx_quic_hexdump(pool->log, "quic initial secret", is, is_len);
#endif