From 5c2877a9f8d295d26e9335b47186c8462c4eb3cb Mon Sep 17 00:00:00 2001 From: Hakase Date: Fri, 25 Nov 2022 21:51:52 +0900 Subject: [PATCH] Latest update --- lib/boringssl | 2 +- lib/pcre | 2 +- src/event/quic/ngx_event_quic_protection.c | 12 ++++++++---- src/http/v3/ngx_http_v3_request.c | 2 ++ 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/boringssl b/lib/boringssl index 5511fa8..2fd8de6 160000 --- a/lib/boringssl +++ b/lib/boringssl @@ -1 +1 @@ -Subproject commit 5511fa833c96c8caa9b51c13367f057c74d850eb +Subproject commit 2fd8de65347cebe9870b872e528658b922f61fe3 diff --git a/lib/pcre b/lib/pcre index 14c1327..f1e48eb 160000 --- a/lib/pcre +++ b/lib/pcre @@ -1 +1 @@ -Subproject commit 14c1327e28c6ac2b62ac0c03a748528c599d1c47 +Subproject commit f1e48ebb3fa48332b4ab1dd18a8075559c727c59 diff --git a/src/event/quic/ngx_event_quic_protection.c b/src/event/quic/ngx_event_quic_protection.c index 3110c9e..91cfc6b 100644 --- a/src/event/quic/ngx_event_quic_protection.c +++ b/src/event/quic/ngx_event_quic_protection.c @@ -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; } diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c index 7921d8d..969fdf3 100644 --- a/src/http/v3/ngx_http_v3_request.c +++ b/src/http/v3/ngx_http_v3_request.c @@ -81,7 +81,9 @@ ngx_http_v3_init(ngx_connection_t *c) if (phc->ssl_servername) { hc->ssl_servername = phc->ssl_servername; +#if (NGX_PCRE) hc->ssl_servername_regex = phc->ssl_servername_regex; +#endif hc->conf_ctx = phc->conf_ctx; ngx_set_connection_log(c, clcf->error_log);