]> git.kaiwu.me - nginx.git/commitdiff
Fixed nonce in short packet protection.
authorSergey Kandaurov <pluknet@nginx.com>
Tue, 10 Mar 2020 15:40:18 +0000 (18:40 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Tue, 10 Mar 2020 15:40:18 +0000 (18:40 +0300)
src/event/ngx_event_quic.c

index 6ea9d23edd87094df99cfd0b8e31a6f9c08dbd8e..55eea0137a7f553f990a58fba501c7969c8a82c2 100644 (file)
@@ -758,7 +758,9 @@ ngx_quic_create_short_packet(ngx_connection_t *c, ngx_ssl_conn_t *ssl_conn,
     }
 
     nonce = ngx_pstrdup(c->pool, &pkt->secret->iv);
-    if (pkt->level == ssl_encryption_handshake) {
+    if (pkt->level == ssl_encryption_handshake
+        || pkt->level == ssl_encryption_application)
+    {
         nonce[11] ^= (*pkt->number - 1);
     }