mirror of
https://github.com/nginx/nginx.git
synced 2025-06-22 22:10:45 +08:00
Fixed header protection application with pn length > 1.
This commit is contained in:
parent
11dfc1c943
commit
1ac31c01b4
@ -1637,7 +1637,10 @@ ngx_quic_decrypt(ngx_connection_t *c, ngx_quic_header_t *pkt)
|
|||||||
|
|
||||||
ngx_memcpy(ad.data, pkt->data, ad.len);
|
ngx_memcpy(ad.data, pkt->data, ad.len);
|
||||||
ad.data[0] = clearflags;
|
ad.data[0] = clearflags;
|
||||||
ad.data[ad.len - pnl] = (u_char) pn;
|
|
||||||
|
do {
|
||||||
|
ad.data[ad.len - pnl] = pn >> (8 * (pnl - 1)) % 256;
|
||||||
|
} while (--pnl);
|
||||||
|
|
||||||
nonce = ngx_pstrdup(c->pool, &pkt->secret->iv);
|
nonce = ngx_pstrdup(c->pool, &pkt->secret->iv);
|
||||||
nonce[11] ^= pn;
|
nonce[11] ^= pn;
|
||||||
|
Loading…
Reference in New Issue
Block a user