Latest update

This commit is contained in:
2022-11-25 21:51:52 +09:00
parent be13f901d4
commit 5c2877a9f8
4 changed files with 12 additions and 6 deletions
+8 -4
View File
@@ -964,10 +964,14 @@ ngx_quic_parse_pn(u_char **pos, ngx_int_t len, u_char *mask,
static void
ngx_quic_compute_nonce(u_char *nonce, size_t len, uint64_t pn)
{
nonce[len - 4] ^= (pn & 0xff000000) >> 24;
nonce[len - 3] ^= (pn & 0x00ff0000) >> 16;
nonce[len - 2] ^= (pn & 0x0000ff00) >> 8;
nonce[len - 1] ^= (pn & 0x000000ff);
nonce[len - 8] ^= (pn >> 56) & 0x3f;
nonce[len - 7] ^= (pn >> 48) & 0xff;
nonce[len - 6] ^= (pn >> 40) & 0xff;
nonce[len - 5] ^= (pn >> 32) & 0xff;
nonce[len - 4] ^= (pn >> 24) & 0xff;
nonce[len - 3] ^= (pn >> 16) & 0xff;
nonce[len - 2] ^= (pn >> 8) & 0xff;
nonce[len - 1] ^= pn & 0xff;
}