]> git.kaiwu.me - nginx.git/commitdiff
QUIC: fixed compat with ciphers other than AES128 (ticket #2500).
authorRoman Arutyunyan <arut@nginx.com>
Sun, 28 May 2023 07:17:07 +0000 (11:17 +0400)
committerRoman Arutyunyan <arut@nginx.com>
Sun, 28 May 2023 07:17:07 +0000 (11:17 +0400)
Previously, rec.level field was not uninitialized in SSL_provide_quic_data().
As a result, its value was always ssl_encryption_initial.  Later in
ngx_quic_ciphers() such level resulted in resetting the cipher to
TLS1_3_CK_AES_128_GCM_SHA256 and using AES128 to encrypt the packet.

Now the level is initialized and the right cipher is used.

src/event/quic/ngx_event_quic_openssl_compat.c

index 51430e4b97299b5ea950894d162acb435c948b5d..63d380e35bd8167bed263681ba9411ef9301cae1 100644 (file)
@@ -463,6 +463,7 @@ SSL_provide_quic_data(SSL *ssl, enum ssl_encryption_level_t level,
         rec.log = c->log;
         rec.number = com->read_record++;
         rec.keys = &com->keys;
+        rec.level = level;
 
         if (level == ssl_encryption_initial) {
             n = ngx_min(len, 65535);