Commit 345d6ad

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update ngtcp2 to 1.23.0
PR-URL: #63777 Backport-PR-URL: #64675 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent a53db01 commit 345d6ad

114 files changed

Lines changed: 7184 additions & 9765 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/ngtcp2/ngtcp2/crypto/boringssl/boringssl.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
432432
intngtcp2_crypto_read_write_crypto_data(
433433
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
434434
constuint8_t*data, size_tdatalen) {
435-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
435+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
436436
intrv;
437437
interr;
438438

@@ -444,7 +444,7 @@ int ngtcp2_crypto_read_write_crypto_data(
444444
return-1;
445445
}
446446

447-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
447+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
448448
retry:
449449
rv=SSL_do_handshake(ssl);
450450
if (rv <= 0) {
@@ -456,7 +456,7 @@ int ngtcp2_crypto_read_write_crypto_data(
456456
caseSSL_ERROR_SSL:
457457
return-1;
458458
caseSSL_ERROR_EARLY_DATA_REJECTED:
459-
assert(!ngtcp2_conn_is_server(conn));
459+
assert(!ngtcp2_conn_is_server2(conn));
460460

461461
SSL_reset_early_data_reject(ssl);
462462

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* ngtcp2
3+
*
4+
* Copyright (c) 2026 ngtcp2 contributors
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining
7+
* a copy of this software and associated documentation files (the
8+
* "Software"), to deal in the Software without restriction, including
9+
* without limitation the rights to use, copy, modify, merge, publish,
10+
* distribute, sublicense, and/or sell copies of the Software, and to
11+
* permit persons to whom the Software is furnished to do so, subject to
12+
* the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be
15+
* included in all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24+
*/
25+
#ifdefHAVE_CONFIG_H
26+
# include<config.h>
27+
#endif/* defined(HAVE_CONFIG_H) */
28+
29+
#include"munit.h"
30+
31+
/* include test cases' include files here */
32+
#include"shared_test.h"
33+
34+
intmain(intargc, char*argv[]) {
35+
constMunitSuitesuites[] = {
36+
shared_suite,
37+
{0},
38+
};
39+
constMunitSuitesuite= {
40+
.prefix="",
41+
.suites=suites,
42+
.iterations=1,
43+
};
44+
45+
returnmunit_suite_main(&suite, NULL, argc, argv);
46+
}

‎deps/ngtcp2/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto.h‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,16 +338,16 @@ ngtcp2_crypto_hp_mask_cb(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
338338
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
339339
* set negotiated AEAD and message digest algorithm. After the
340340
* successful call of this function, application can use
341-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
342-
* if |level| ==
341+
* `ngtcp2_conn_get_crypto_ctx2` (or
342+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
343343
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
344344
* get :type:`ngtcp2_crypto_ctx`.
345345
*
346346
* If |conn| is initialized as client, and |level| is
347347
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
348348
* function retrieves a remote QUIC transport parameters extension
349-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
350-
* sets it to |conn| by calling
349+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
350+
* and sets it to |conn| by calling
351351
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
352352
*
353353
* This function returns 0 if it succeeds, or -1.
@@ -385,16 +385,16 @@ NGTCP2_EXTERN int ngtcp2_crypto_derive_and_install_rx_key(
385385
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
386386
* set negotiated AEAD and message digest algorithm. After the
387387
* successful call of this function, application can use
388-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
389-
* if |level| ==
388+
* `ngtcp2_conn_get_crypto_ctx2` (or
389+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
390390
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
391391
* get :type:`ngtcp2_crypto_ctx`.
392392
*
393393
* If |conn| is initialized as server, and |level| is
394394
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
395395
* function retrieves a remote QUIC transport parameters extension
396-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
397-
* sets it to |conn| by calling
396+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
397+
* and sets it to |conn| by calling
398398
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
399399
*
400400
* This function returns 0 if it succeeds, or -1.
@@ -986,15 +986,17 @@ NGTCP2_EXTERN void ngtcp2_crypto_delete_crypto_cipher_ctx_cb(
986986
/**
987987
* @function
988988
*
989+
* .. warning::
990+
*
991+
* .. version-deprecated:: 1.22.0
992+
* Use `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
993+
*
989994
* `ngtcp2_crypto_get_path_challenge_data_cb` writes unpredictable
990995
* sequence of :macro:`NGTCP2_PATH_CHALLENGE_DATALEN` bytes to |data|
991996
* which is sent with PATH_CHALLENGE frame.
992997
*
993998
* This function can be directly passed to
994999
* :member:`ngtcp2_callbacks.get_path_challenge_data` field.
995-
*
996-
* Deprecated since v1.22.0. Use
997-
* `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
9981000
*/
9991001
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn*conn,
10001002
uint8_t*data,
@@ -1010,7 +1012,7 @@ NGTCP2_EXTERN int ngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn *conn,
10101012
* This function can be directly passed to
10111013
* :member:`ngtcp2_callbacks.get_path_challenge_data2` field.
10121014
*
1013-
* This function has been available since v1.22.0.
1015+
* .. version-added:: 1.22.0
10141016
*/
10151017
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data2_cb(
10161018
ngtcp2_conn*conn, ngtcp2_path_challenge_data*data, void*user_data);

‎deps/ngtcp2/ngtcp2/crypto/ossl/ossl.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ static int crypto_ossl_ctx_write_crypto_data(ngtcp2_crypto_ossl_ctx *ossl_ctx,
440440
left=crypto_buf_left(ossl_ctx->crypto_write);
441441
}
442442

443-
n=ngtcp2_min_size((size_t)(end-data), left);
443+
n=ngtcp2_min((size_t)(end-data), left);
444444
crypto_buf_write(ossl_ctx->crypto_write, data, n);
445445
data+=n;
446446
}
@@ -871,7 +871,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
871871
intngtcp2_crypto_read_write_crypto_data(
872872
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
873873
constuint8_t*data, size_tdatalen) {
874-
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
874+
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
875875
SSL*ssl=ossl_ctx->ssl;
876876
intrv;
877877
interr;
@@ -881,7 +881,7 @@ int ngtcp2_crypto_read_write_crypto_data(
881881
return-1;
882882
}
883883

884-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
884+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
885885
rv=SSL_do_handshake(ssl);
886886
if (rv <= 0) {
887887
err=SSL_get_error(ssl, rv);
@@ -1033,7 +1033,7 @@ static int ossl_yield_secret(SSL *ssl, uint32_t ossl_level, int direction,
10331033
}
10341034

10351035
conn=conn_ref->get_conn(conn_ref);
1036-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1036+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10371037

10381038
if (direction) {
10391039
if (ngtcp2_crypto_derive_and_install_tx_key(conn, NULL, NULL, NULL, level,
@@ -1067,7 +1067,7 @@ static int ossl_crypto_send(SSL *ssl, const unsigned char *buf, size_t buflen,
10671067
}
10681068

10691069
conn=conn_ref->get_conn(conn_ref);
1070-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1070+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10711071

10721072
rv=ngtcp2_conn_submit_crypto_data(conn, ossl_ctx->tx_level, buf, buflen);
10731073
if (rv!=0) {
@@ -1094,7 +1094,7 @@ static int ossl_crypto_recv_rcd(SSL *ssl, const unsigned char **buf,
10941094
}
10951095

10961096
conn=conn_ref->get_conn(conn_ref);
1097-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1097+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10981098

10991099
crypto_ossl_ctx_read_crypto_data(ossl_ctx, buf, bytes_read);
11001100

@@ -1116,7 +1116,7 @@ static int ossl_crypto_release_rcd(SSL *ssl, size_t released, void *arg) {
11161116
}
11171117

11181118
conn=conn_ref->get_conn(conn_ref);
1119-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1119+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
11201120

11211121
crypto_ossl_ctx_release_crypto_data(ossl_ctx, released);
11221122

‎deps/ngtcp2/ngtcp2/crypto/picotls/picotls.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
378378
intngtcp2_crypto_read_write_crypto_data(
379379
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
380380
constuint8_t*data, size_tdatalen) {
381-
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle(conn);
381+
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle2(conn);
382382
ptls_buffer_tsendbuf;
383383
size_tepoch_offsets[5] = {0};
384384
size_tepoch=
@@ -402,7 +402,7 @@ int ngtcp2_crypto_read_write_crypto_data(
402402
goto fin;
403403
}
404404

405-
if (!ngtcp2_conn_is_server(conn) &&
405+
if (!ngtcp2_conn_is_server2(conn) &&
406406
cptls->handshake_properties.client.early_data_acceptance==
407407
PTLS_EARLY_DATA_REJECTED) {
408408
rv=ngtcp2_conn_tls_early_data_rejected(conn);
@@ -540,7 +540,7 @@ static int set_additional_extensions(ptls_handshake_properties_t *hsprops,
540540
return-1;
541541
}
542542

543-
nwrite=ngtcp2_conn_encode_local_transport_params(conn, buf, buflen);
543+
nwrite=ngtcp2_conn_encode_local_transport_params2(conn, buf, buflen);
544544
if (nwrite<0) {
545545
goto fail;
546546
}
@@ -620,7 +620,7 @@ static int update_traffic_key_server_cb(ptls_update_traffic_key_t *self,
620620
* wait for the key to get the correct local transport
621621
* parameters from ngtcp2_conn.
622622
*/
623-
cptls=ngtcp2_conn_get_tls_native_handle(conn);
623+
cptls=ngtcp2_conn_get_tls_native_handle2(conn);
624624

625625
if (set_additional_extensions(&cptls->handshake_properties, conn) !=0) {
626626
return-1;

‎deps/ngtcp2/ngtcp2/crypto/quictls/quictls.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
812812
intngtcp2_crypto_read_write_crypto_data(
813813
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
814814
constuint8_t*data, size_tdatalen) {
815-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
815+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
816816
intrv;
817817
interr;
818818

@@ -824,7 +824,7 @@ int ngtcp2_crypto_read_write_crypto_data(
824824
return-1;
825825
}
826826

827-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
827+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
828828
rv=SSL_do_handshake(ssl);
829829
if (rv <= 0) {
830830
err=SSL_get_error(ssl, rv);

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Commit 345d6ad

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update ngtcp2 to 1.23.0
PR-URL: #63777 Backport-PR-URL: #64675 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent a53db01 commit 345d6ad

114 files changed

Lines changed: 7184 additions & 9765 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/ngtcp2/ngtcp2/crypto/boringssl/boringssl.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
432432
intngtcp2_crypto_read_write_crypto_data(
433433
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
434434
constuint8_t*data, size_tdatalen) {
435-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
435+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
436436
intrv;
437437
interr;
438438

@@ -444,7 +444,7 @@ int ngtcp2_crypto_read_write_crypto_data(
444444
return-1;
445445
}
446446

447-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
447+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
448448
retry:
449449
rv=SSL_do_handshake(ssl);
450450
if (rv <= 0) {
@@ -456,7 +456,7 @@ int ngtcp2_crypto_read_write_crypto_data(
456456
caseSSL_ERROR_SSL:
457457
return-1;
458458
caseSSL_ERROR_EARLY_DATA_REJECTED:
459-
assert(!ngtcp2_conn_is_server(conn));
459+
assert(!ngtcp2_conn_is_server2(conn));
460460

461461
SSL_reset_early_data_reject(ssl);
462462

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* ngtcp2
3+
*
4+
* Copyright (c) 2026 ngtcp2 contributors
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining
7+
* a copy of this software and associated documentation files (the
8+
* "Software"), to deal in the Software without restriction, including
9+
* without limitation the rights to use, copy, modify, merge, publish,
10+
* distribute, sublicense, and/or sell copies of the Software, and to
11+
* permit persons to whom the Software is furnished to do so, subject to
12+
* the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be
15+
* included in all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24+
*/
25+
#ifdefHAVE_CONFIG_H
26+
# include<config.h>
27+
#endif/* defined(HAVE_CONFIG_H) */
28+
29+
#include"munit.h"
30+
31+
/* include test cases' include files here */
32+
#include"shared_test.h"
33+
34+
intmain(intargc, char*argv[]) {
35+
constMunitSuitesuites[] = {
36+
shared_suite,
37+
{0},
38+
};
39+
constMunitSuitesuite= {
40+
.prefix="",
41+
.suites=suites,
42+
.iterations=1,
43+
};
44+
45+
returnmunit_suite_main(&suite, NULL, argc, argv);
46+
}

‎deps/ngtcp2/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto.h‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,16 +338,16 @@ ngtcp2_crypto_hp_mask_cb(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
338338
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
339339
* set negotiated AEAD and message digest algorithm. After the
340340
* successful call of this function, application can use
341-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
342-
* if |level| ==
341+
* `ngtcp2_conn_get_crypto_ctx2` (or
342+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
343343
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
344344
* get :type:`ngtcp2_crypto_ctx`.
345345
*
346346
* If |conn| is initialized as client, and |level| is
347347
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
348348
* function retrieves a remote QUIC transport parameters extension
349-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
350-
* sets it to |conn| by calling
349+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
350+
* and sets it to |conn| by calling
351351
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
352352
*
353353
* This function returns 0 if it succeeds, or -1.
@@ -385,16 +385,16 @@ NGTCP2_EXTERN int ngtcp2_crypto_derive_and_install_rx_key(
385385
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
386386
* set negotiated AEAD and message digest algorithm. After the
387387
* successful call of this function, application can use
388-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
389-
* if |level| ==
388+
* `ngtcp2_conn_get_crypto_ctx2` (or
389+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
390390
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
391391
* get :type:`ngtcp2_crypto_ctx`.
392392
*
393393
* If |conn| is initialized as server, and |level| is
394394
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
395395
* function retrieves a remote QUIC transport parameters extension
396-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
397-
* sets it to |conn| by calling
396+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
397+
* and sets it to |conn| by calling
398398
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
399399
*
400400
* This function returns 0 if it succeeds, or -1.
@@ -986,15 +986,17 @@ NGTCP2_EXTERN void ngtcp2_crypto_delete_crypto_cipher_ctx_cb(
986986
/**
987987
* @function
988988
*
989+
* .. warning::
990+
*
991+
* .. version-deprecated:: 1.22.0
992+
* Use `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
993+
*
989994
* `ngtcp2_crypto_get_path_challenge_data_cb` writes unpredictable
990995
* sequence of :macro:`NGTCP2_PATH_CHALLENGE_DATALEN` bytes to |data|
991996
* which is sent with PATH_CHALLENGE frame.
992997
*
993998
* This function can be directly passed to
994999
* :member:`ngtcp2_callbacks.get_path_challenge_data` field.
995-
*
996-
* Deprecated since v1.22.0. Use
997-
* `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
9981000
*/
9991001
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn*conn,
10001002
uint8_t*data,
@@ -1010,7 +1012,7 @@ NGTCP2_EXTERN int ngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn *conn,
10101012
* This function can be directly passed to
10111013
* :member:`ngtcp2_callbacks.get_path_challenge_data2` field.
10121014
*
1013-
* This function has been available since v1.22.0.
1015+
* .. version-added:: 1.22.0
10141016
*/
10151017
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data2_cb(
10161018
ngtcp2_conn*conn, ngtcp2_path_challenge_data*data, void*user_data);

‎deps/ngtcp2/ngtcp2/crypto/ossl/ossl.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ static int crypto_ossl_ctx_write_crypto_data(ngtcp2_crypto_ossl_ctx *ossl_ctx,
440440
left=crypto_buf_left(ossl_ctx->crypto_write);
441441
}
442442

443-
n=ngtcp2_min_size((size_t)(end-data), left);
443+
n=ngtcp2_min((size_t)(end-data), left);
444444
crypto_buf_write(ossl_ctx->crypto_write, data, n);
445445
data+=n;
446446
}
@@ -871,7 +871,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
871871
intngtcp2_crypto_read_write_crypto_data(
872872
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
873873
constuint8_t*data, size_tdatalen) {
874-
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
874+
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
875875
SSL*ssl=ossl_ctx->ssl;
876876
intrv;
877877
interr;
@@ -881,7 +881,7 @@ int ngtcp2_crypto_read_write_crypto_data(
881881
return-1;
882882
}
883883

884-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
884+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
885885
rv=SSL_do_handshake(ssl);
886886
if (rv <= 0) {
887887
err=SSL_get_error(ssl, rv);
@@ -1033,7 +1033,7 @@ static int ossl_yield_secret(SSL *ssl, uint32_t ossl_level, int direction,
10331033
}
10341034

10351035
conn=conn_ref->get_conn(conn_ref);
1036-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1036+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10371037

10381038
if (direction) {
10391039
if (ngtcp2_crypto_derive_and_install_tx_key(conn, NULL, NULL, NULL, level,
@@ -1067,7 +1067,7 @@ static int ossl_crypto_send(SSL *ssl, const unsigned char *buf, size_t buflen,
10671067
}
10681068

10691069
conn=conn_ref->get_conn(conn_ref);
1070-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1070+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10711071

10721072
rv=ngtcp2_conn_submit_crypto_data(conn, ossl_ctx->tx_level, buf, buflen);
10731073
if (rv!=0) {
@@ -1094,7 +1094,7 @@ static int ossl_crypto_recv_rcd(SSL *ssl, const unsigned char **buf,
10941094
}
10951095

10961096
conn=conn_ref->get_conn(conn_ref);
1097-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1097+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10981098

10991099
crypto_ossl_ctx_read_crypto_data(ossl_ctx, buf, bytes_read);
11001100

@@ -1116,7 +1116,7 @@ static int ossl_crypto_release_rcd(SSL *ssl, size_t released, void *arg) {
11161116
}
11171117

11181118
conn=conn_ref->get_conn(conn_ref);
1119-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1119+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
11201120

11211121
crypto_ossl_ctx_release_crypto_data(ossl_ctx, released);
11221122

‎deps/ngtcp2/ngtcp2/crypto/picotls/picotls.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
378378
intngtcp2_crypto_read_write_crypto_data(
379379
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
380380
constuint8_t*data, size_tdatalen) {
381-
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle(conn);
381+
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle2(conn);
382382
ptls_buffer_tsendbuf;
383383
size_tepoch_offsets[5] = {0};
384384
size_tepoch=
@@ -402,7 +402,7 @@ int ngtcp2_crypto_read_write_crypto_data(
402402
goto fin;
403403
}
404404

405-
if (!ngtcp2_conn_is_server(conn) &&
405+
if (!ngtcp2_conn_is_server2(conn) &&
406406
cptls->handshake_properties.client.early_data_acceptance==
407407
PTLS_EARLY_DATA_REJECTED) {
408408
rv=ngtcp2_conn_tls_early_data_rejected(conn);
@@ -540,7 +540,7 @@ static int set_additional_extensions(ptls_handshake_properties_t *hsprops,
540540
return-1;
541541
}
542542

543-
nwrite=ngtcp2_conn_encode_local_transport_params(conn, buf, buflen);
543+
nwrite=ngtcp2_conn_encode_local_transport_params2(conn, buf, buflen);
544544
if (nwrite<0) {
545545
goto fail;
546546
}
@@ -620,7 +620,7 @@ static int update_traffic_key_server_cb(ptls_update_traffic_key_t *self,
620620
* wait for the key to get the correct local transport
621621
* parameters from ngtcp2_conn.
622622
*/
623-
cptls=ngtcp2_conn_get_tls_native_handle(conn);
623+
cptls=ngtcp2_conn_get_tls_native_handle2(conn);
624624

625625
if (set_additional_extensions(&cptls->handshake_properties, conn) !=0) {
626626
return-1;

‎deps/ngtcp2/ngtcp2/crypto/quictls/quictls.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
812812
intngtcp2_crypto_read_write_crypto_data(
813813
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
814814
constuint8_t*data, size_tdatalen) {
815-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
815+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
816816
intrv;
817817
interr;
818818

@@ -824,7 +824,7 @@ int ngtcp2_crypto_read_write_crypto_data(
824824
return-1;
825825
}
826826

827-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
827+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
828828
rv=SSL_do_handshake(ssl);
829829
if (rv <= 0) {
830830
err=SSL_get_error(ssl, rv);

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 345d6ad

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update ngtcp2 to 1.23.0
PR-URL: #63777 Backport-PR-URL: #64675 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent a53db01 commit 345d6ad

114 files changed

Lines changed: 7184 additions & 9765 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/ngtcp2/ngtcp2/crypto/boringssl/boringssl.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
432432
intngtcp2_crypto_read_write_crypto_data(
433433
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
434434
constuint8_t*data, size_tdatalen) {
435-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
435+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
436436
intrv;
437437
interr;
438438

@@ -444,7 +444,7 @@ int ngtcp2_crypto_read_write_crypto_data(
444444
return-1;
445445
}
446446

447-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
447+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
448448
retry:
449449
rv=SSL_do_handshake(ssl);
450450
if (rv <= 0) {
@@ -456,7 +456,7 @@ int ngtcp2_crypto_read_write_crypto_data(
456456
caseSSL_ERROR_SSL:
457457
return-1;
458458
caseSSL_ERROR_EARLY_DATA_REJECTED:
459-
assert(!ngtcp2_conn_is_server(conn));
459+
assert(!ngtcp2_conn_is_server2(conn));
460460

461461
SSL_reset_early_data_reject(ssl);
462462

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* ngtcp2
3+
*
4+
* Copyright (c) 2026 ngtcp2 contributors
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining
7+
* a copy of this software and associated documentation files (the
8+
* "Software"), to deal in the Software without restriction, including
9+
* without limitation the rights to use, copy, modify, merge, publish,
10+
* distribute, sublicense, and/or sell copies of the Software, and to
11+
* permit persons to whom the Software is furnished to do so, subject to
12+
* the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be
15+
* included in all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24+
*/
25+
#ifdefHAVE_CONFIG_H
26+
# include<config.h>
27+
#endif/* defined(HAVE_CONFIG_H) */
28+
29+
#include"munit.h"
30+
31+
/* include test cases' include files here */
32+
#include"shared_test.h"
33+
34+
intmain(intargc, char*argv[]) {
35+
constMunitSuitesuites[] = {
36+
shared_suite,
37+
{0},
38+
};
39+
constMunitSuitesuite= {
40+
.prefix="",
41+
.suites=suites,
42+
.iterations=1,
43+
};
44+
45+
returnmunit_suite_main(&suite, NULL, argc, argv);
46+
}

‎deps/ngtcp2/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto.h‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,16 +338,16 @@ ngtcp2_crypto_hp_mask_cb(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
338338
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
339339
* set negotiated AEAD and message digest algorithm. After the
340340
* successful call of this function, application can use
341-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
342-
* if |level| ==
341+
* `ngtcp2_conn_get_crypto_ctx2` (or
342+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
343343
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
344344
* get :type:`ngtcp2_crypto_ctx`.
345345
*
346346
* If |conn| is initialized as client, and |level| is
347347
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
348348
* function retrieves a remote QUIC transport parameters extension
349-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
350-
* sets it to |conn| by calling
349+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
350+
* and sets it to |conn| by calling
351351
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
352352
*
353353
* This function returns 0 if it succeeds, or -1.
@@ -385,16 +385,16 @@ NGTCP2_EXTERN int ngtcp2_crypto_derive_and_install_rx_key(
385385
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
386386
* set negotiated AEAD and message digest algorithm. After the
387387
* successful call of this function, application can use
388-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
389-
* if |level| ==
388+
* `ngtcp2_conn_get_crypto_ctx2` (or
389+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
390390
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
391391
* get :type:`ngtcp2_crypto_ctx`.
392392
*
393393
* If |conn| is initialized as server, and |level| is
394394
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
395395
* function retrieves a remote QUIC transport parameters extension
396-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
397-
* sets it to |conn| by calling
396+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
397+
* and sets it to |conn| by calling
398398
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
399399
*
400400
* This function returns 0 if it succeeds, or -1.
@@ -986,15 +986,17 @@ NGTCP2_EXTERN void ngtcp2_crypto_delete_crypto_cipher_ctx_cb(
986986
/**
987987
* @function
988988
*
989+
* .. warning::
990+
*
991+
* .. version-deprecated:: 1.22.0
992+
* Use `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
993+
*
989994
* `ngtcp2_crypto_get_path_challenge_data_cb` writes unpredictable
990995
* sequence of :macro:`NGTCP2_PATH_CHALLENGE_DATALEN` bytes to |data|
991996
* which is sent with PATH_CHALLENGE frame.
992997
*
993998
* This function can be directly passed to
994999
* :member:`ngtcp2_callbacks.get_path_challenge_data` field.
995-
*
996-
* Deprecated since v1.22.0. Use
997-
* `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
9981000
*/
9991001
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn*conn,
10001002
uint8_t*data,
@@ -1010,7 +1012,7 @@ NGTCP2_EXTERN int ngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn *conn,
10101012
* This function can be directly passed to
10111013
* :member:`ngtcp2_callbacks.get_path_challenge_data2` field.
10121014
*
1013-
* This function has been available since v1.22.0.
1015+
* .. version-added:: 1.22.0
10141016
*/
10151017
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data2_cb(
10161018
ngtcp2_conn*conn, ngtcp2_path_challenge_data*data, void*user_data);

‎deps/ngtcp2/ngtcp2/crypto/ossl/ossl.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ static int crypto_ossl_ctx_write_crypto_data(ngtcp2_crypto_ossl_ctx *ossl_ctx,
440440
left=crypto_buf_left(ossl_ctx->crypto_write);
441441
}
442442

443-
n=ngtcp2_min_size((size_t)(end-data), left);
443+
n=ngtcp2_min((size_t)(end-data), left);
444444
crypto_buf_write(ossl_ctx->crypto_write, data, n);
445445
data+=n;
446446
}
@@ -871,7 +871,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
871871
intngtcp2_crypto_read_write_crypto_data(
872872
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
873873
constuint8_t*data, size_tdatalen) {
874-
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
874+
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
875875
SSL*ssl=ossl_ctx->ssl;
876876
intrv;
877877
interr;
@@ -881,7 +881,7 @@ int ngtcp2_crypto_read_write_crypto_data(
881881
return-1;
882882
}
883883

884-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
884+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
885885
rv=SSL_do_handshake(ssl);
886886
if (rv <= 0) {
887887
err=SSL_get_error(ssl, rv);
@@ -1033,7 +1033,7 @@ static int ossl_yield_secret(SSL *ssl, uint32_t ossl_level, int direction,
10331033
}
10341034

10351035
conn=conn_ref->get_conn(conn_ref);
1036-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1036+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10371037

10381038
if (direction) {
10391039
if (ngtcp2_crypto_derive_and_install_tx_key(conn, NULL, NULL, NULL, level,
@@ -1067,7 +1067,7 @@ static int ossl_crypto_send(SSL *ssl, const unsigned char *buf, size_t buflen,
10671067
}
10681068

10691069
conn=conn_ref->get_conn(conn_ref);
1070-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1070+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10711071

10721072
rv=ngtcp2_conn_submit_crypto_data(conn, ossl_ctx->tx_level, buf, buflen);
10731073
if (rv!=0) {
@@ -1094,7 +1094,7 @@ static int ossl_crypto_recv_rcd(SSL *ssl, const unsigned char **buf,
10941094
}
10951095

10961096
conn=conn_ref->get_conn(conn_ref);
1097-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1097+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10981098

10991099
crypto_ossl_ctx_read_crypto_data(ossl_ctx, buf, bytes_read);
11001100

@@ -1116,7 +1116,7 @@ static int ossl_crypto_release_rcd(SSL *ssl, size_t released, void *arg) {
11161116
}
11171117

11181118
conn=conn_ref->get_conn(conn_ref);
1119-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1119+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
11201120

11211121
crypto_ossl_ctx_release_crypto_data(ossl_ctx, released);
11221122

‎deps/ngtcp2/ngtcp2/crypto/picotls/picotls.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
378378
intngtcp2_crypto_read_write_crypto_data(
379379
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
380380
constuint8_t*data, size_tdatalen) {
381-
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle(conn);
381+
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle2(conn);
382382
ptls_buffer_tsendbuf;
383383
size_tepoch_offsets[5] = {0};
384384
size_tepoch=
@@ -402,7 +402,7 @@ int ngtcp2_crypto_read_write_crypto_data(
402402
goto fin;
403403
}
404404

405-
if (!ngtcp2_conn_is_server(conn) &&
405+
if (!ngtcp2_conn_is_server2(conn) &&
406406
cptls->handshake_properties.client.early_data_acceptance==
407407
PTLS_EARLY_DATA_REJECTED) {
408408
rv=ngtcp2_conn_tls_early_data_rejected(conn);
@@ -540,7 +540,7 @@ static int set_additional_extensions(ptls_handshake_properties_t *hsprops,
540540
return-1;
541541
}
542542

543-
nwrite=ngtcp2_conn_encode_local_transport_params(conn, buf, buflen);
543+
nwrite=ngtcp2_conn_encode_local_transport_params2(conn, buf, buflen);
544544
if (nwrite<0) {
545545
goto fail;
546546
}
@@ -620,7 +620,7 @@ static int update_traffic_key_server_cb(ptls_update_traffic_key_t *self,
620620
* wait for the key to get the correct local transport
621621
* parameters from ngtcp2_conn.
622622
*/
623-
cptls=ngtcp2_conn_get_tls_native_handle(conn);
623+
cptls=ngtcp2_conn_get_tls_native_handle2(conn);
624624

625625
if (set_additional_extensions(&cptls->handshake_properties, conn) !=0) {
626626
return-1;

‎deps/ngtcp2/ngtcp2/crypto/quictls/quictls.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
812812
intngtcp2_crypto_read_write_crypto_data(
813813
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
814814
constuint8_t*data, size_tdatalen) {
815-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
815+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
816816
intrv;
817817
interr;
818818

@@ -824,7 +824,7 @@ int ngtcp2_crypto_read_write_crypto_data(
824824
return-1;
825825
}
826826

827-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
827+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
828828
rv=SSL_do_handshake(ssl);
829829
if (rv <= 0) {
830830
err=SSL_get_error(ssl, rv);

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 345d6ad

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update ngtcp2 to 1.23.0
PR-URL: #63777 Backport-PR-URL: #64675 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent a53db01 commit 345d6ad

114 files changed

Lines changed: 7184 additions & 9765 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/ngtcp2/ngtcp2/crypto/boringssl/boringssl.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
432432
intngtcp2_crypto_read_write_crypto_data(
433433
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
434434
constuint8_t*data, size_tdatalen) {
435-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
435+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
436436
intrv;
437437
interr;
438438

@@ -444,7 +444,7 @@ int ngtcp2_crypto_read_write_crypto_data(
444444
return-1;
445445
}
446446

447-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
447+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
448448
retry:
449449
rv=SSL_do_handshake(ssl);
450450
if (rv <= 0) {
@@ -456,7 +456,7 @@ int ngtcp2_crypto_read_write_crypto_data(
456456
caseSSL_ERROR_SSL:
457457
return-1;
458458
caseSSL_ERROR_EARLY_DATA_REJECTED:
459-
assert(!ngtcp2_conn_is_server(conn));
459+
assert(!ngtcp2_conn_is_server2(conn));
460460

461461
SSL_reset_early_data_reject(ssl);
462462

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* ngtcp2
3+
*
4+
* Copyright (c) 2026 ngtcp2 contributors
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining
7+
* a copy of this software and associated documentation files (the
8+
* "Software"), to deal in the Software without restriction, including
9+
* without limitation the rights to use, copy, modify, merge, publish,
10+
* distribute, sublicense, and/or sell copies of the Software, and to
11+
* permit persons to whom the Software is furnished to do so, subject to
12+
* the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be
15+
* included in all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24+
*/
25+
#ifdefHAVE_CONFIG_H
26+
# include<config.h>
27+
#endif/* defined(HAVE_CONFIG_H) */
28+
29+
#include"munit.h"
30+
31+
/* include test cases' include files here */
32+
#include"shared_test.h"
33+
34+
intmain(intargc, char*argv[]) {
35+
constMunitSuitesuites[] = {
36+
shared_suite,
37+
{0},
38+
};
39+
constMunitSuitesuite= {
40+
.prefix="",
41+
.suites=suites,
42+
.iterations=1,
43+
};
44+
45+
returnmunit_suite_main(&suite, NULL, argc, argv);
46+
}

‎deps/ngtcp2/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto.h‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,16 +338,16 @@ ngtcp2_crypto_hp_mask_cb(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
338338
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
339339
* set negotiated AEAD and message digest algorithm. After the
340340
* successful call of this function, application can use
341-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
342-
* if |level| ==
341+
* `ngtcp2_conn_get_crypto_ctx2` (or
342+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
343343
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
344344
* get :type:`ngtcp2_crypto_ctx`.
345345
*
346346
* If |conn| is initialized as client, and |level| is
347347
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
348348
* function retrieves a remote QUIC transport parameters extension
349-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
350-
* sets it to |conn| by calling
349+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
350+
* and sets it to |conn| by calling
351351
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
352352
*
353353
* This function returns 0 if it succeeds, or -1.
@@ -385,16 +385,16 @@ NGTCP2_EXTERN int ngtcp2_crypto_derive_and_install_rx_key(
385385
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
386386
* set negotiated AEAD and message digest algorithm. After the
387387
* successful call of this function, application can use
388-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
389-
* if |level| ==
388+
* `ngtcp2_conn_get_crypto_ctx2` (or
389+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
390390
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
391391
* get :type:`ngtcp2_crypto_ctx`.
392392
*
393393
* If |conn| is initialized as server, and |level| is
394394
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
395395
* function retrieves a remote QUIC transport parameters extension
396-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
397-
* sets it to |conn| by calling
396+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
397+
* and sets it to |conn| by calling
398398
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
399399
*
400400
* This function returns 0 if it succeeds, or -1.
@@ -986,15 +986,17 @@ NGTCP2_EXTERN void ngtcp2_crypto_delete_crypto_cipher_ctx_cb(
986986
/**
987987
* @function
988988
*
989+
* .. warning::
990+
*
991+
* .. version-deprecated:: 1.22.0
992+
* Use `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
993+
*
989994
* `ngtcp2_crypto_get_path_challenge_data_cb` writes unpredictable
990995
* sequence of :macro:`NGTCP2_PATH_CHALLENGE_DATALEN` bytes to |data|
991996
* which is sent with PATH_CHALLENGE frame.
992997
*
993998
* This function can be directly passed to
994999
* :member:`ngtcp2_callbacks.get_path_challenge_data` field.
995-
*
996-
* Deprecated since v1.22.0. Use
997-
* `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
9981000
*/
9991001
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn*conn,
10001002
uint8_t*data,
@@ -1010,7 +1012,7 @@ NGTCP2_EXTERN int ngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn *conn,
10101012
* This function can be directly passed to
10111013
* :member:`ngtcp2_callbacks.get_path_challenge_data2` field.
10121014
*
1013-
* This function has been available since v1.22.0.
1015+
* .. version-added:: 1.22.0
10141016
*/
10151017
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data2_cb(
10161018
ngtcp2_conn*conn, ngtcp2_path_challenge_data*data, void*user_data);

‎deps/ngtcp2/ngtcp2/crypto/ossl/ossl.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ static int crypto_ossl_ctx_write_crypto_data(ngtcp2_crypto_ossl_ctx *ossl_ctx,
440440
left=crypto_buf_left(ossl_ctx->crypto_write);
441441
}
442442

443-
n=ngtcp2_min_size((size_t)(end-data), left);
443+
n=ngtcp2_min((size_t)(end-data), left);
444444
crypto_buf_write(ossl_ctx->crypto_write, data, n);
445445
data+=n;
446446
}
@@ -871,7 +871,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
871871
intngtcp2_crypto_read_write_crypto_data(
872872
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
873873
constuint8_t*data, size_tdatalen) {
874-
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
874+
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
875875
SSL*ssl=ossl_ctx->ssl;
876876
intrv;
877877
interr;
@@ -881,7 +881,7 @@ int ngtcp2_crypto_read_write_crypto_data(
881881
return-1;
882882
}
883883

884-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
884+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
885885
rv=SSL_do_handshake(ssl);
886886
if (rv <= 0) {
887887
err=SSL_get_error(ssl, rv);
@@ -1033,7 +1033,7 @@ static int ossl_yield_secret(SSL *ssl, uint32_t ossl_level, int direction,
10331033
}
10341034

10351035
conn=conn_ref->get_conn(conn_ref);
1036-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1036+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10371037

10381038
if (direction) {
10391039
if (ngtcp2_crypto_derive_and_install_tx_key(conn, NULL, NULL, NULL, level,
@@ -1067,7 +1067,7 @@ static int ossl_crypto_send(SSL *ssl, const unsigned char *buf, size_t buflen,
10671067
}
10681068

10691069
conn=conn_ref->get_conn(conn_ref);
1070-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1070+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10711071

10721072
rv=ngtcp2_conn_submit_crypto_data(conn, ossl_ctx->tx_level, buf, buflen);
10731073
if (rv!=0) {
@@ -1094,7 +1094,7 @@ static int ossl_crypto_recv_rcd(SSL *ssl, const unsigned char **buf,
10941094
}
10951095

10961096
conn=conn_ref->get_conn(conn_ref);
1097-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1097+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10981098

10991099
crypto_ossl_ctx_read_crypto_data(ossl_ctx, buf, bytes_read);
11001100

@@ -1116,7 +1116,7 @@ static int ossl_crypto_release_rcd(SSL *ssl, size_t released, void *arg) {
11161116
}
11171117

11181118
conn=conn_ref->get_conn(conn_ref);
1119-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1119+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
11201120

11211121
crypto_ossl_ctx_release_crypto_data(ossl_ctx, released);
11221122

‎deps/ngtcp2/ngtcp2/crypto/picotls/picotls.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
378378
intngtcp2_crypto_read_write_crypto_data(
379379
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
380380
constuint8_t*data, size_tdatalen) {
381-
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle(conn);
381+
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle2(conn);
382382
ptls_buffer_tsendbuf;
383383
size_tepoch_offsets[5] = {0};
384384
size_tepoch=
@@ -402,7 +402,7 @@ int ngtcp2_crypto_read_write_crypto_data(
402402
goto fin;
403403
}
404404

405-
if (!ngtcp2_conn_is_server(conn) &&
405+
if (!ngtcp2_conn_is_server2(conn) &&
406406
cptls->handshake_properties.client.early_data_acceptance==
407407
PTLS_EARLY_DATA_REJECTED) {
408408
rv=ngtcp2_conn_tls_early_data_rejected(conn);
@@ -540,7 +540,7 @@ static int set_additional_extensions(ptls_handshake_properties_t *hsprops,
540540
return-1;
541541
}
542542

543-
nwrite=ngtcp2_conn_encode_local_transport_params(conn, buf, buflen);
543+
nwrite=ngtcp2_conn_encode_local_transport_params2(conn, buf, buflen);
544544
if (nwrite<0) {
545545
goto fail;
546546
}
@@ -620,7 +620,7 @@ static int update_traffic_key_server_cb(ptls_update_traffic_key_t *self,
620620
* wait for the key to get the correct local transport
621621
* parameters from ngtcp2_conn.
622622
*/
623-
cptls=ngtcp2_conn_get_tls_native_handle(conn);
623+
cptls=ngtcp2_conn_get_tls_native_handle2(conn);
624624

625625
if (set_additional_extensions(&cptls->handshake_properties, conn) !=0) {
626626
return-1;

‎deps/ngtcp2/ngtcp2/crypto/quictls/quictls.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
812812
intngtcp2_crypto_read_write_crypto_data(
813813
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
814814
constuint8_t*data, size_tdatalen) {
815-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
815+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
816816
intrv;
817817
interr;
818818

@@ -824,7 +824,7 @@ int ngtcp2_crypto_read_write_crypto_data(
824824
return-1;
825825
}
826826

827-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
827+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
828828
rv=SSL_do_handshake(ssl);
829829
if (rv <= 0) {
830830
err=SSL_get_error(ssl, rv);

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Commit 345d6ad

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update ngtcp2 to 1.23.0
PR-URL: #63777 Backport-PR-URL: #64675 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent a53db01 commit 345d6ad

114 files changed

Lines changed: 7184 additions & 9765 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/ngtcp2/ngtcp2/crypto/boringssl/boringssl.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
432432
intngtcp2_crypto_read_write_crypto_data(
433433
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
434434
constuint8_t*data, size_tdatalen) {
435-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
435+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
436436
intrv;
437437
interr;
438438

@@ -444,7 +444,7 @@ int ngtcp2_crypto_read_write_crypto_data(
444444
return-1;
445445
}
446446

447-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
447+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
448448
retry:
449449
rv=SSL_do_handshake(ssl);
450450
if (rv <= 0) {
@@ -456,7 +456,7 @@ int ngtcp2_crypto_read_write_crypto_data(
456456
caseSSL_ERROR_SSL:
457457
return-1;
458458
caseSSL_ERROR_EARLY_DATA_REJECTED:
459-
assert(!ngtcp2_conn_is_server(conn));
459+
assert(!ngtcp2_conn_is_server2(conn));
460460

461461
SSL_reset_early_data_reject(ssl);
462462

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* ngtcp2
3+
*
4+
* Copyright (c) 2026 ngtcp2 contributors
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining
7+
* a copy of this software and associated documentation files (the
8+
* "Software"), to deal in the Software without restriction, including
9+
* without limitation the rights to use, copy, modify, merge, publish,
10+
* distribute, sublicense, and/or sell copies of the Software, and to
11+
* permit persons to whom the Software is furnished to do so, subject to
12+
* the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be
15+
* included in all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24+
*/
25+
#ifdefHAVE_CONFIG_H
26+
# include<config.h>
27+
#endif/* defined(HAVE_CONFIG_H) */
28+
29+
#include"munit.h"
30+
31+
/* include test cases' include files here */
32+
#include"shared_test.h"
33+
34+
intmain(intargc, char*argv[]) {
35+
constMunitSuitesuites[] = {
36+
shared_suite,
37+
{0},
38+
};
39+
constMunitSuitesuite= {
40+
.prefix="",
41+
.suites=suites,
42+
.iterations=1,
43+
};
44+
45+
returnmunit_suite_main(&suite, NULL, argc, argv);
46+
}

‎deps/ngtcp2/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto.h‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,16 +338,16 @@ ngtcp2_crypto_hp_mask_cb(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
338338
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
339339
* set negotiated AEAD and message digest algorithm. After the
340340
* successful call of this function, application can use
341-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
342-
* if |level| ==
341+
* `ngtcp2_conn_get_crypto_ctx2` (or
342+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
343343
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
344344
* get :type:`ngtcp2_crypto_ctx`.
345345
*
346346
* If |conn| is initialized as client, and |level| is
347347
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
348348
* function retrieves a remote QUIC transport parameters extension
349-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
350-
* sets it to |conn| by calling
349+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
350+
* and sets it to |conn| by calling
351351
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
352352
*
353353
* This function returns 0 if it succeeds, or -1.
@@ -385,16 +385,16 @@ NGTCP2_EXTERN int ngtcp2_crypto_derive_and_install_rx_key(
385385
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
386386
* set negotiated AEAD and message digest algorithm. After the
387387
* successful call of this function, application can use
388-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
389-
* if |level| ==
388+
* `ngtcp2_conn_get_crypto_ctx2` (or
389+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
390390
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
391391
* get :type:`ngtcp2_crypto_ctx`.
392392
*
393393
* If |conn| is initialized as server, and |level| is
394394
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
395395
* function retrieves a remote QUIC transport parameters extension
396-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
397-
* sets it to |conn| by calling
396+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
397+
* and sets it to |conn| by calling
398398
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
399399
*
400400
* This function returns 0 if it succeeds, or -1.
@@ -986,15 +986,17 @@ NGTCP2_EXTERN void ngtcp2_crypto_delete_crypto_cipher_ctx_cb(
986986
/**
987987
* @function
988988
*
989+
* .. warning::
990+
*
991+
* .. version-deprecated:: 1.22.0
992+
* Use `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
993+
*
989994
* `ngtcp2_crypto_get_path_challenge_data_cb` writes unpredictable
990995
* sequence of :macro:`NGTCP2_PATH_CHALLENGE_DATALEN` bytes to |data|
991996
* which is sent with PATH_CHALLENGE frame.
992997
*
993998
* This function can be directly passed to
994999
* :member:`ngtcp2_callbacks.get_path_challenge_data` field.
995-
*
996-
* Deprecated since v1.22.0. Use
997-
* `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
9981000
*/
9991001
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn*conn,
10001002
uint8_t*data,
@@ -1010,7 +1012,7 @@ NGTCP2_EXTERN int ngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn *conn,
10101012
* This function can be directly passed to
10111013
* :member:`ngtcp2_callbacks.get_path_challenge_data2` field.
10121014
*
1013-
* This function has been available since v1.22.0.
1015+
* .. version-added:: 1.22.0
10141016
*/
10151017
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data2_cb(
10161018
ngtcp2_conn*conn, ngtcp2_path_challenge_data*data, void*user_data);

‎deps/ngtcp2/ngtcp2/crypto/ossl/ossl.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ static int crypto_ossl_ctx_write_crypto_data(ngtcp2_crypto_ossl_ctx *ossl_ctx,
440440
left=crypto_buf_left(ossl_ctx->crypto_write);
441441
}
442442

443-
n=ngtcp2_min_size((size_t)(end-data), left);
443+
n=ngtcp2_min((size_t)(end-data), left);
444444
crypto_buf_write(ossl_ctx->crypto_write, data, n);
445445
data+=n;
446446
}
@@ -871,7 +871,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
871871
intngtcp2_crypto_read_write_crypto_data(
872872
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
873873
constuint8_t*data, size_tdatalen) {
874-
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
874+
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
875875
SSL*ssl=ossl_ctx->ssl;
876876
intrv;
877877
interr;
@@ -881,7 +881,7 @@ int ngtcp2_crypto_read_write_crypto_data(
881881
return-1;
882882
}
883883

884-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
884+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
885885
rv=SSL_do_handshake(ssl);
886886
if (rv <= 0) {
887887
err=SSL_get_error(ssl, rv);
@@ -1033,7 +1033,7 @@ static int ossl_yield_secret(SSL *ssl, uint32_t ossl_level, int direction,
10331033
}
10341034

10351035
conn=conn_ref->get_conn(conn_ref);
1036-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1036+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10371037

10381038
if (direction) {
10391039
if (ngtcp2_crypto_derive_and_install_tx_key(conn, NULL, NULL, NULL, level,
@@ -1067,7 +1067,7 @@ static int ossl_crypto_send(SSL *ssl, const unsigned char *buf, size_t buflen,
10671067
}
10681068

10691069
conn=conn_ref->get_conn(conn_ref);
1070-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1070+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10711071

10721072
rv=ngtcp2_conn_submit_crypto_data(conn, ossl_ctx->tx_level, buf, buflen);
10731073
if (rv!=0) {
@@ -1094,7 +1094,7 @@ static int ossl_crypto_recv_rcd(SSL *ssl, const unsigned char **buf,
10941094
}
10951095

10961096
conn=conn_ref->get_conn(conn_ref);
1097-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1097+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10981098

10991099
crypto_ossl_ctx_read_crypto_data(ossl_ctx, buf, bytes_read);
11001100

@@ -1116,7 +1116,7 @@ static int ossl_crypto_release_rcd(SSL *ssl, size_t released, void *arg) {
11161116
}
11171117

11181118
conn=conn_ref->get_conn(conn_ref);
1119-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1119+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
11201120

11211121
crypto_ossl_ctx_release_crypto_data(ossl_ctx, released);
11221122

‎deps/ngtcp2/ngtcp2/crypto/picotls/picotls.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
378378
intngtcp2_crypto_read_write_crypto_data(
379379
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
380380
constuint8_t*data, size_tdatalen) {
381-
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle(conn);
381+
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle2(conn);
382382
ptls_buffer_tsendbuf;
383383
size_tepoch_offsets[5] = {0};
384384
size_tepoch=
@@ -402,7 +402,7 @@ int ngtcp2_crypto_read_write_crypto_data(
402402
goto fin;
403403
}
404404

405-
if (!ngtcp2_conn_is_server(conn) &&
405+
if (!ngtcp2_conn_is_server2(conn) &&
406406
cptls->handshake_properties.client.early_data_acceptance==
407407
PTLS_EARLY_DATA_REJECTED) {
408408
rv=ngtcp2_conn_tls_early_data_rejected(conn);
@@ -540,7 +540,7 @@ static int set_additional_extensions(ptls_handshake_properties_t *hsprops,
540540
return-1;
541541
}
542542

543-
nwrite=ngtcp2_conn_encode_local_transport_params(conn, buf, buflen);
543+
nwrite=ngtcp2_conn_encode_local_transport_params2(conn, buf, buflen);
544544
if (nwrite<0) {
545545
goto fail;
546546
}
@@ -620,7 +620,7 @@ static int update_traffic_key_server_cb(ptls_update_traffic_key_t *self,
620620
* wait for the key to get the correct local transport
621621
* parameters from ngtcp2_conn.
622622
*/
623-
cptls=ngtcp2_conn_get_tls_native_handle(conn);
623+
cptls=ngtcp2_conn_get_tls_native_handle2(conn);
624624

625625
if (set_additional_extensions(&cptls->handshake_properties, conn) !=0) {
626626
return-1;

‎deps/ngtcp2/ngtcp2/crypto/quictls/quictls.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
812812
intngtcp2_crypto_read_write_crypto_data(
813813
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
814814
constuint8_t*data, size_tdatalen) {
815-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
815+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
816816
intrv;
817817
interr;
818818

@@ -824,7 +824,7 @@ int ngtcp2_crypto_read_write_crypto_data(
824824
return-1;
825825
}
826826

827-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
827+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
828828
rv=SSL_do_handshake(ssl);
829829
if (rv <= 0) {
830830
err=SSL_get_error(ssl, rv);

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 345d6ad

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update ngtcp2 to 1.23.0
PR-URL: #63777 Backport-PR-URL: #64675 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent a53db01 commit 345d6ad

114 files changed

Lines changed: 7184 additions & 9765 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/ngtcp2/ngtcp2/crypto/boringssl/boringssl.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
432432
intngtcp2_crypto_read_write_crypto_data(
433433
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
434434
constuint8_t*data, size_tdatalen) {
435-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
435+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
436436
intrv;
437437
interr;
438438

@@ -444,7 +444,7 @@ int ngtcp2_crypto_read_write_crypto_data(
444444
return-1;
445445
}
446446

447-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
447+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
448448
retry:
449449
rv=SSL_do_handshake(ssl);
450450
if (rv <= 0) {
@@ -456,7 +456,7 @@ int ngtcp2_crypto_read_write_crypto_data(
456456
caseSSL_ERROR_SSL:
457457
return-1;
458458
caseSSL_ERROR_EARLY_DATA_REJECTED:
459-
assert(!ngtcp2_conn_is_server(conn));
459+
assert(!ngtcp2_conn_is_server2(conn));
460460

461461
SSL_reset_early_data_reject(ssl);
462462

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* ngtcp2
3+
*
4+
* Copyright (c) 2026 ngtcp2 contributors
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining
7+
* a copy of this software and associated documentation files (the
8+
* "Software"), to deal in the Software without restriction, including
9+
* without limitation the rights to use, copy, modify, merge, publish,
10+
* distribute, sublicense, and/or sell copies of the Software, and to
11+
* permit persons to whom the Software is furnished to do so, subject to
12+
* the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be
15+
* included in all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24+
*/
25+
#ifdefHAVE_CONFIG_H
26+
# include<config.h>
27+
#endif/* defined(HAVE_CONFIG_H) */
28+
29+
#include"munit.h"
30+
31+
/* include test cases' include files here */
32+
#include"shared_test.h"
33+
34+
intmain(intargc, char*argv[]) {
35+
constMunitSuitesuites[] = {
36+
shared_suite,
37+
{0},
38+
};
39+
constMunitSuitesuite= {
40+
.prefix="",
41+
.suites=suites,
42+
.iterations=1,
43+
};
44+
45+
returnmunit_suite_main(&suite, NULL, argc, argv);
46+
}

‎deps/ngtcp2/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto.h‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,16 +338,16 @@ ngtcp2_crypto_hp_mask_cb(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
338338
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
339339
* set negotiated AEAD and message digest algorithm. After the
340340
* successful call of this function, application can use
341-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
342-
* if |level| ==
341+
* `ngtcp2_conn_get_crypto_ctx2` (or
342+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
343343
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
344344
* get :type:`ngtcp2_crypto_ctx`.
345345
*
346346
* If |conn| is initialized as client, and |level| is
347347
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
348348
* function retrieves a remote QUIC transport parameters extension
349-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
350-
* sets it to |conn| by calling
349+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
350+
* and sets it to |conn| by calling
351351
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
352352
*
353353
* This function returns 0 if it succeeds, or -1.
@@ -385,16 +385,16 @@ NGTCP2_EXTERN int ngtcp2_crypto_derive_and_install_rx_key(
385385
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
386386
* set negotiated AEAD and message digest algorithm. After the
387387
* successful call of this function, application can use
388-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
389-
* if |level| ==
388+
* `ngtcp2_conn_get_crypto_ctx2` (or
389+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
390390
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
391391
* get :type:`ngtcp2_crypto_ctx`.
392392
*
393393
* If |conn| is initialized as server, and |level| is
394394
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
395395
* function retrieves a remote QUIC transport parameters extension
396-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
397-
* sets it to |conn| by calling
396+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
397+
* and sets it to |conn| by calling
398398
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
399399
*
400400
* This function returns 0 if it succeeds, or -1.
@@ -986,15 +986,17 @@ NGTCP2_EXTERN void ngtcp2_crypto_delete_crypto_cipher_ctx_cb(
986986
/**
987987
* @function
988988
*
989+
* .. warning::
990+
*
991+
* .. version-deprecated:: 1.22.0
992+
* Use `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
993+
*
989994
* `ngtcp2_crypto_get_path_challenge_data_cb` writes unpredictable
990995
* sequence of :macro:`NGTCP2_PATH_CHALLENGE_DATALEN` bytes to |data|
991996
* which is sent with PATH_CHALLENGE frame.
992997
*
993998
* This function can be directly passed to
994999
* :member:`ngtcp2_callbacks.get_path_challenge_data` field.
995-
*
996-
* Deprecated since v1.22.0. Use
997-
* `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
9981000
*/
9991001
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn*conn,
10001002
uint8_t*data,
@@ -1010,7 +1012,7 @@ NGTCP2_EXTERN int ngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn *conn,
10101012
* This function can be directly passed to
10111013
* :member:`ngtcp2_callbacks.get_path_challenge_data2` field.
10121014
*
1013-
* This function has been available since v1.22.0.
1015+
* .. version-added:: 1.22.0
10141016
*/
10151017
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data2_cb(
10161018
ngtcp2_conn*conn, ngtcp2_path_challenge_data*data, void*user_data);

‎deps/ngtcp2/ngtcp2/crypto/ossl/ossl.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ static int crypto_ossl_ctx_write_crypto_data(ngtcp2_crypto_ossl_ctx *ossl_ctx,
440440
left=crypto_buf_left(ossl_ctx->crypto_write);
441441
}
442442

443-
n=ngtcp2_min_size((size_t)(end-data), left);
443+
n=ngtcp2_min((size_t)(end-data), left);
444444
crypto_buf_write(ossl_ctx->crypto_write, data, n);
445445
data+=n;
446446
}
@@ -871,7 +871,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
871871
intngtcp2_crypto_read_write_crypto_data(
872872
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
873873
constuint8_t*data, size_tdatalen) {
874-
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
874+
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
875875
SSL*ssl=ossl_ctx->ssl;
876876
intrv;
877877
interr;
@@ -881,7 +881,7 @@ int ngtcp2_crypto_read_write_crypto_data(
881881
return-1;
882882
}
883883

884-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
884+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
885885
rv=SSL_do_handshake(ssl);
886886
if (rv <= 0) {
887887
err=SSL_get_error(ssl, rv);
@@ -1033,7 +1033,7 @@ static int ossl_yield_secret(SSL *ssl, uint32_t ossl_level, int direction,
10331033
}
10341034

10351035
conn=conn_ref->get_conn(conn_ref);
1036-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1036+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10371037

10381038
if (direction) {
10391039
if (ngtcp2_crypto_derive_and_install_tx_key(conn, NULL, NULL, NULL, level,
@@ -1067,7 +1067,7 @@ static int ossl_crypto_send(SSL *ssl, const unsigned char *buf, size_t buflen,
10671067
}
10681068

10691069
conn=conn_ref->get_conn(conn_ref);
1070-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1070+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10711071

10721072
rv=ngtcp2_conn_submit_crypto_data(conn, ossl_ctx->tx_level, buf, buflen);
10731073
if (rv!=0) {
@@ -1094,7 +1094,7 @@ static int ossl_crypto_recv_rcd(SSL *ssl, const unsigned char **buf,
10941094
}
10951095

10961096
conn=conn_ref->get_conn(conn_ref);
1097-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1097+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10981098

10991099
crypto_ossl_ctx_read_crypto_data(ossl_ctx, buf, bytes_read);
11001100

@@ -1116,7 +1116,7 @@ static int ossl_crypto_release_rcd(SSL *ssl, size_t released, void *arg) {
11161116
}
11171117

11181118
conn=conn_ref->get_conn(conn_ref);
1119-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1119+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
11201120

11211121
crypto_ossl_ctx_release_crypto_data(ossl_ctx, released);
11221122

‎deps/ngtcp2/ngtcp2/crypto/picotls/picotls.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
378378
intngtcp2_crypto_read_write_crypto_data(
379379
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
380380
constuint8_t*data, size_tdatalen) {
381-
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle(conn);
381+
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle2(conn);
382382
ptls_buffer_tsendbuf;
383383
size_tepoch_offsets[5] = {0};
384384
size_tepoch=
@@ -402,7 +402,7 @@ int ngtcp2_crypto_read_write_crypto_data(
402402
goto fin;
403403
}
404404

405-
if (!ngtcp2_conn_is_server(conn) &&
405+
if (!ngtcp2_conn_is_server2(conn) &&
406406
cptls->handshake_properties.client.early_data_acceptance==
407407
PTLS_EARLY_DATA_REJECTED) {
408408
rv=ngtcp2_conn_tls_early_data_rejected(conn);
@@ -540,7 +540,7 @@ static int set_additional_extensions(ptls_handshake_properties_t *hsprops,
540540
return-1;
541541
}
542542

543-
nwrite=ngtcp2_conn_encode_local_transport_params(conn, buf, buflen);
543+
nwrite=ngtcp2_conn_encode_local_transport_params2(conn, buf, buflen);
544544
if (nwrite<0) {
545545
goto fail;
546546
}
@@ -620,7 +620,7 @@ static int update_traffic_key_server_cb(ptls_update_traffic_key_t *self,
620620
* wait for the key to get the correct local transport
621621
* parameters from ngtcp2_conn.
622622
*/
623-
cptls=ngtcp2_conn_get_tls_native_handle(conn);
623+
cptls=ngtcp2_conn_get_tls_native_handle2(conn);
624624

625625
if (set_additional_extensions(&cptls->handshake_properties, conn) !=0) {
626626
return-1;

‎deps/ngtcp2/ngtcp2/crypto/quictls/quictls.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
812812
intngtcp2_crypto_read_write_crypto_data(
813813
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
814814
constuint8_t*data, size_tdatalen) {
815-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
815+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
816816
intrv;
817817
interr;
818818

@@ -824,7 +824,7 @@ int ngtcp2_crypto_read_write_crypto_data(
824824
return-1;
825825
}
826826

827-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
827+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
828828
rv=SSL_do_handshake(ssl);
829829
if (rv <= 0) {
830830
err=SSL_get_error(ssl, rv);

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 345d6ad

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update ngtcp2 to 1.23.0
PR-URL: #63777 Backport-PR-URL: #64675 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent a53db01 commit 345d6ad

114 files changed

Lines changed: 7184 additions & 9765 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/ngtcp2/ngtcp2/crypto/boringssl/boringssl.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
432432
intngtcp2_crypto_read_write_crypto_data(
433433
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
434434
constuint8_t*data, size_tdatalen) {
435-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
435+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
436436
intrv;
437437
interr;
438438

@@ -444,7 +444,7 @@ int ngtcp2_crypto_read_write_crypto_data(
444444
return-1;
445445
}
446446

447-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
447+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
448448
retry:
449449
rv=SSL_do_handshake(ssl);
450450
if (rv <= 0) {
@@ -456,7 +456,7 @@ int ngtcp2_crypto_read_write_crypto_data(
456456
caseSSL_ERROR_SSL:
457457
return-1;
458458
caseSSL_ERROR_EARLY_DATA_REJECTED:
459-
assert(!ngtcp2_conn_is_server(conn));
459+
assert(!ngtcp2_conn_is_server2(conn));
460460

461461
SSL_reset_early_data_reject(ssl);
462462

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* ngtcp2
3+
*
4+
* Copyright (c) 2026 ngtcp2 contributors
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining
7+
* a copy of this software and associated documentation files (the
8+
* "Software"), to deal in the Software without restriction, including
9+
* without limitation the rights to use, copy, modify, merge, publish,
10+
* distribute, sublicense, and/or sell copies of the Software, and to
11+
* permit persons to whom the Software is furnished to do so, subject to
12+
* the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be
15+
* included in all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24+
*/
25+
#ifdefHAVE_CONFIG_H
26+
# include<config.h>
27+
#endif/* defined(HAVE_CONFIG_H) */
28+
29+
#include"munit.h"
30+
31+
/* include test cases' include files here */
32+
#include"shared_test.h"
33+
34+
intmain(intargc, char*argv[]) {
35+
constMunitSuitesuites[] = {
36+
shared_suite,
37+
{0},
38+
};
39+
constMunitSuitesuite= {
40+
.prefix="",
41+
.suites=suites,
42+
.iterations=1,
43+
};
44+
45+
returnmunit_suite_main(&suite, NULL, argc, argv);
46+
}

‎deps/ngtcp2/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto.h‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,16 +338,16 @@ ngtcp2_crypto_hp_mask_cb(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
338338
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
339339
* set negotiated AEAD and message digest algorithm. After the
340340
* successful call of this function, application can use
341-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
342-
* if |level| ==
341+
* `ngtcp2_conn_get_crypto_ctx2` (or
342+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
343343
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
344344
* get :type:`ngtcp2_crypto_ctx`.
345345
*
346346
* If |conn| is initialized as client, and |level| is
347347
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
348348
* function retrieves a remote QUIC transport parameters extension
349-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
350-
* sets it to |conn| by calling
349+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
350+
* and sets it to |conn| by calling
351351
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
352352
*
353353
* This function returns 0 if it succeeds, or -1.
@@ -385,16 +385,16 @@ NGTCP2_EXTERN int ngtcp2_crypto_derive_and_install_rx_key(
385385
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
386386
* set negotiated AEAD and message digest algorithm. After the
387387
* successful call of this function, application can use
388-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
389-
* if |level| ==
388+
* `ngtcp2_conn_get_crypto_ctx2` (or
389+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
390390
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
391391
* get :type:`ngtcp2_crypto_ctx`.
392392
*
393393
* If |conn| is initialized as server, and |level| is
394394
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
395395
* function retrieves a remote QUIC transport parameters extension
396-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
397-
* sets it to |conn| by calling
396+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
397+
* and sets it to |conn| by calling
398398
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
399399
*
400400
* This function returns 0 if it succeeds, or -1.
@@ -986,15 +986,17 @@ NGTCP2_EXTERN void ngtcp2_crypto_delete_crypto_cipher_ctx_cb(
986986
/**
987987
* @function
988988
*
989+
* .. warning::
990+
*
991+
* .. version-deprecated:: 1.22.0
992+
* Use `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
993+
*
989994
* `ngtcp2_crypto_get_path_challenge_data_cb` writes unpredictable
990995
* sequence of :macro:`NGTCP2_PATH_CHALLENGE_DATALEN` bytes to |data|
991996
* which is sent with PATH_CHALLENGE frame.
992997
*
993998
* This function can be directly passed to
994999
* :member:`ngtcp2_callbacks.get_path_challenge_data` field.
995-
*
996-
* Deprecated since v1.22.0. Use
997-
* `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
9981000
*/
9991001
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn*conn,
10001002
uint8_t*data,
@@ -1010,7 +1012,7 @@ NGTCP2_EXTERN int ngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn *conn,
10101012
* This function can be directly passed to
10111013
* :member:`ngtcp2_callbacks.get_path_challenge_data2` field.
10121014
*
1013-
* This function has been available since v1.22.0.
1015+
* .. version-added:: 1.22.0
10141016
*/
10151017
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data2_cb(
10161018
ngtcp2_conn*conn, ngtcp2_path_challenge_data*data, void*user_data);

‎deps/ngtcp2/ngtcp2/crypto/ossl/ossl.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ static int crypto_ossl_ctx_write_crypto_data(ngtcp2_crypto_ossl_ctx *ossl_ctx,
440440
left=crypto_buf_left(ossl_ctx->crypto_write);
441441
}
442442

443-
n=ngtcp2_min_size((size_t)(end-data), left);
443+
n=ngtcp2_min((size_t)(end-data), left);
444444
crypto_buf_write(ossl_ctx->crypto_write, data, n);
445445
data+=n;
446446
}
@@ -871,7 +871,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
871871
intngtcp2_crypto_read_write_crypto_data(
872872
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
873873
constuint8_t*data, size_tdatalen) {
874-
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
874+
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
875875
SSL*ssl=ossl_ctx->ssl;
876876
intrv;
877877
interr;
@@ -881,7 +881,7 @@ int ngtcp2_crypto_read_write_crypto_data(
881881
return-1;
882882
}
883883

884-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
884+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
885885
rv=SSL_do_handshake(ssl);
886886
if (rv <= 0) {
887887
err=SSL_get_error(ssl, rv);
@@ -1033,7 +1033,7 @@ static int ossl_yield_secret(SSL *ssl, uint32_t ossl_level, int direction,
10331033
}
10341034

10351035
conn=conn_ref->get_conn(conn_ref);
1036-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1036+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10371037

10381038
if (direction) {
10391039
if (ngtcp2_crypto_derive_and_install_tx_key(conn, NULL, NULL, NULL, level,
@@ -1067,7 +1067,7 @@ static int ossl_crypto_send(SSL *ssl, const unsigned char *buf, size_t buflen,
10671067
}
10681068

10691069
conn=conn_ref->get_conn(conn_ref);
1070-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1070+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10711071

10721072
rv=ngtcp2_conn_submit_crypto_data(conn, ossl_ctx->tx_level, buf, buflen);
10731073
if (rv!=0) {
@@ -1094,7 +1094,7 @@ static int ossl_crypto_recv_rcd(SSL *ssl, const unsigned char **buf,
10941094
}
10951095

10961096
conn=conn_ref->get_conn(conn_ref);
1097-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1097+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10981098

10991099
crypto_ossl_ctx_read_crypto_data(ossl_ctx, buf, bytes_read);
11001100

@@ -1116,7 +1116,7 @@ static int ossl_crypto_release_rcd(SSL *ssl, size_t released, void *arg) {
11161116
}
11171117

11181118
conn=conn_ref->get_conn(conn_ref);
1119-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1119+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
11201120

11211121
crypto_ossl_ctx_release_crypto_data(ossl_ctx, released);
11221122

‎deps/ngtcp2/ngtcp2/crypto/picotls/picotls.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
378378
intngtcp2_crypto_read_write_crypto_data(
379379
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
380380
constuint8_t*data, size_tdatalen) {
381-
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle(conn);
381+
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle2(conn);
382382
ptls_buffer_tsendbuf;
383383
size_tepoch_offsets[5] = {0};
384384
size_tepoch=
@@ -402,7 +402,7 @@ int ngtcp2_crypto_read_write_crypto_data(
402402
goto fin;
403403
}
404404

405-
if (!ngtcp2_conn_is_server(conn) &&
405+
if (!ngtcp2_conn_is_server2(conn) &&
406406
cptls->handshake_properties.client.early_data_acceptance==
407407
PTLS_EARLY_DATA_REJECTED) {
408408
rv=ngtcp2_conn_tls_early_data_rejected(conn);
@@ -540,7 +540,7 @@ static int set_additional_extensions(ptls_handshake_properties_t *hsprops,
540540
return-1;
541541
}
542542

543-
nwrite=ngtcp2_conn_encode_local_transport_params(conn, buf, buflen);
543+
nwrite=ngtcp2_conn_encode_local_transport_params2(conn, buf, buflen);
544544
if (nwrite<0) {
545545
goto fail;
546546
}
@@ -620,7 +620,7 @@ static int update_traffic_key_server_cb(ptls_update_traffic_key_t *self,
620620
* wait for the key to get the correct local transport
621621
* parameters from ngtcp2_conn.
622622
*/
623-
cptls=ngtcp2_conn_get_tls_native_handle(conn);
623+
cptls=ngtcp2_conn_get_tls_native_handle2(conn);
624624

625625
if (set_additional_extensions(&cptls->handshake_properties, conn) !=0) {
626626
return-1;

‎deps/ngtcp2/ngtcp2/crypto/quictls/quictls.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
812812
intngtcp2_crypto_read_write_crypto_data(
813813
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
814814
constuint8_t*data, size_tdatalen) {
815-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
815+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
816816
intrv;
817817
interr;
818818

@@ -824,7 +824,7 @@ int ngtcp2_crypto_read_write_crypto_data(
824824
return-1;
825825
}
826826

827-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
827+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
828828
rv=SSL_do_handshake(ssl);
829829
if (rv <= 0) {
830830
err=SSL_get_error(ssl, rv);

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Commit 345d6ad

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update ngtcp2 to 1.23.0
PR-URL: #63777 Backport-PR-URL: #64675 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent a53db01 commit 345d6ad

114 files changed

Lines changed: 7184 additions & 9765 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎deps/ngtcp2/ngtcp2/crypto/boringssl/boringssl.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
432432
intngtcp2_crypto_read_write_crypto_data(
433433
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
434434
constuint8_t*data, size_tdatalen) {
435-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
435+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
436436
intrv;
437437
interr;
438438

@@ -444,7 +444,7 @@ int ngtcp2_crypto_read_write_crypto_data(
444444
return-1;
445445
}
446446

447-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
447+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
448448
retry:
449449
rv=SSL_do_handshake(ssl);
450450
if (rv <= 0) {
@@ -456,7 +456,7 @@ int ngtcp2_crypto_read_write_crypto_data(
456456
caseSSL_ERROR_SSL:
457457
return-1;
458458
caseSSL_ERROR_EARLY_DATA_REJECTED:
459-
assert(!ngtcp2_conn_is_server(conn));
459+
assert(!ngtcp2_conn_is_server2(conn));
460460

461461
SSL_reset_early_data_reject(ssl);
462462

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* ngtcp2
3+
*
4+
* Copyright (c) 2026 ngtcp2 contributors
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining
7+
* a copy of this software and associated documentation files (the
8+
* "Software"), to deal in the Software without restriction, including
9+
* without limitation the rights to use, copy, modify, merge, publish,
10+
* distribute, sublicense, and/or sell copies of the Software, and to
11+
* permit persons to whom the Software is furnished to do so, subject to
12+
* the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be
15+
* included in all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24+
*/
25+
#ifdefHAVE_CONFIG_H
26+
# include<config.h>
27+
#endif/* defined(HAVE_CONFIG_H) */
28+
29+
#include"munit.h"
30+
31+
/* include test cases' include files here */
32+
#include"shared_test.h"
33+
34+
intmain(intargc, char*argv[]) {
35+
constMunitSuitesuites[] = {
36+
shared_suite,
37+
{0},
38+
};
39+
constMunitSuitesuite= {
40+
.prefix="",
41+
.suites=suites,
42+
.iterations=1,
43+
};
44+
45+
returnmunit_suite_main(&suite, NULL, argc, argv);
46+
}

‎deps/ngtcp2/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto.h‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,16 +338,16 @@ ngtcp2_crypto_hp_mask_cb(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
338338
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
339339
* set negotiated AEAD and message digest algorithm. After the
340340
* successful call of this function, application can use
341-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
342-
* if |level| ==
341+
* `ngtcp2_conn_get_crypto_ctx2` (or
342+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
343343
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
344344
* get :type:`ngtcp2_crypto_ctx`.
345345
*
346346
* If |conn| is initialized as client, and |level| is
347347
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
348348
* function retrieves a remote QUIC transport parameters extension
349-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
350-
* sets it to |conn| by calling
349+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
350+
* and sets it to |conn| by calling
351351
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
352352
*
353353
* This function returns 0 if it succeeds, or -1.
@@ -385,16 +385,16 @@ NGTCP2_EXTERN int ngtcp2_crypto_derive_and_install_rx_key(
385385
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
386386
* set negotiated AEAD and message digest algorithm. After the
387387
* successful call of this function, application can use
388-
* `ngtcp2_conn_get_crypto_ctx` (or `ngtcp2_conn_get_0rtt_crypto_ctx`
389-
* if |level| ==
388+
* `ngtcp2_conn_get_crypto_ctx2` (or
389+
* `ngtcp2_conn_get_0rtt_crypto_ctx2` if |level| ==
390390
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_0RTT`) to
391391
* get :type:`ngtcp2_crypto_ctx`.
392392
*
393393
* If |conn| is initialized as server, and |level| is
394394
* :enum:`ngtcp2_encryption_level.NGTCP2_ENCRYPTION_LEVEL_1RTT`, this
395395
* function retrieves a remote QUIC transport parameters extension
396-
* from an object obtained by `ngtcp2_conn_get_tls_native_handle`, and
397-
* sets it to |conn| by calling
396+
* from an object obtained by `ngtcp2_conn_get_tls_native_handle2`,
397+
* and sets it to |conn| by calling
398398
* `ngtcp2_conn_decode_and_set_remote_transport_params`.
399399
*
400400
* This function returns 0 if it succeeds, or -1.
@@ -986,15 +986,17 @@ NGTCP2_EXTERN void ngtcp2_crypto_delete_crypto_cipher_ctx_cb(
986986
/**
987987
* @function
988988
*
989+
* .. warning::
990+
*
991+
* .. version-deprecated:: 1.22.0
992+
* Use `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
993+
*
989994
* `ngtcp2_crypto_get_path_challenge_data_cb` writes unpredictable
990995
* sequence of :macro:`NGTCP2_PATH_CHALLENGE_DATALEN` bytes to |data|
991996
* which is sent with PATH_CHALLENGE frame.
992997
*
993998
* This function can be directly passed to
994999
* :member:`ngtcp2_callbacks.get_path_challenge_data` field.
995-
*
996-
* Deprecated since v1.22.0. Use
997-
* `ngtcp2_crypto_get_path_challenge_data2_cb` instead.
9981000
*/
9991001
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn*conn,
10001002
uint8_t*data,
@@ -1010,7 +1012,7 @@ NGTCP2_EXTERN int ngtcp2_crypto_get_path_challenge_data_cb(ngtcp2_conn *conn,
10101012
* This function can be directly passed to
10111013
* :member:`ngtcp2_callbacks.get_path_challenge_data2` field.
10121014
*
1013-
* This function has been available since v1.22.0.
1015+
* .. version-added:: 1.22.0
10141016
*/
10151017
NGTCP2_EXTERNintngtcp2_crypto_get_path_challenge_data2_cb(
10161018
ngtcp2_conn*conn, ngtcp2_path_challenge_data*data, void*user_data);

‎deps/ngtcp2/ngtcp2/crypto/ossl/ossl.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ static int crypto_ossl_ctx_write_crypto_data(ngtcp2_crypto_ossl_ctx *ossl_ctx,
440440
left=crypto_buf_left(ossl_ctx->crypto_write);
441441
}
442442

443-
n=ngtcp2_min_size((size_t)(end-data), left);
443+
n=ngtcp2_min((size_t)(end-data), left);
444444
crypto_buf_write(ossl_ctx->crypto_write, data, n);
445445
data+=n;
446446
}
@@ -871,7 +871,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
871871
intngtcp2_crypto_read_write_crypto_data(
872872
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
873873
constuint8_t*data, size_tdatalen) {
874-
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
874+
ngtcp2_crypto_ossl_ctx*ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
875875
SSL*ssl=ossl_ctx->ssl;
876876
intrv;
877877
interr;
@@ -881,7 +881,7 @@ int ngtcp2_crypto_read_write_crypto_data(
881881
return-1;
882882
}
883883

884-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
884+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
885885
rv=SSL_do_handshake(ssl);
886886
if (rv <= 0) {
887887
err=SSL_get_error(ssl, rv);
@@ -1033,7 +1033,7 @@ static int ossl_yield_secret(SSL *ssl, uint32_t ossl_level, int direction,
10331033
}
10341034

10351035
conn=conn_ref->get_conn(conn_ref);
1036-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1036+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10371037

10381038
if (direction) {
10391039
if (ngtcp2_crypto_derive_and_install_tx_key(conn, NULL, NULL, NULL, level,
@@ -1067,7 +1067,7 @@ static int ossl_crypto_send(SSL *ssl, const unsigned char *buf, size_t buflen,
10671067
}
10681068

10691069
conn=conn_ref->get_conn(conn_ref);
1070-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1070+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10711071

10721072
rv=ngtcp2_conn_submit_crypto_data(conn, ossl_ctx->tx_level, buf, buflen);
10731073
if (rv!=0) {
@@ -1094,7 +1094,7 @@ static int ossl_crypto_recv_rcd(SSL *ssl, const unsigned char **buf,
10941094
}
10951095

10961096
conn=conn_ref->get_conn(conn_ref);
1097-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1097+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
10981098

10991099
crypto_ossl_ctx_read_crypto_data(ossl_ctx, buf, bytes_read);
11001100

@@ -1116,7 +1116,7 @@ static int ossl_crypto_release_rcd(SSL *ssl, size_t released, void *arg) {
11161116
}
11171117

11181118
conn=conn_ref->get_conn(conn_ref);
1119-
ossl_ctx=ngtcp2_conn_get_tls_native_handle(conn);
1119+
ossl_ctx=ngtcp2_conn_get_tls_native_handle2(conn);
11201120

11211121
crypto_ossl_ctx_release_crypto_data(ossl_ctx, released);
11221122

‎deps/ngtcp2/ngtcp2/crypto/picotls/picotls.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
378378
intngtcp2_crypto_read_write_crypto_data(
379379
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
380380
constuint8_t*data, size_tdatalen) {
381-
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle(conn);
381+
ngtcp2_crypto_picotls_ctx*cptls=ngtcp2_conn_get_tls_native_handle2(conn);
382382
ptls_buffer_tsendbuf;
383383
size_tepoch_offsets[5] = {0};
384384
size_tepoch=
@@ -402,7 +402,7 @@ int ngtcp2_crypto_read_write_crypto_data(
402402
goto fin;
403403
}
404404

405-
if (!ngtcp2_conn_is_server(conn) &&
405+
if (!ngtcp2_conn_is_server2(conn) &&
406406
cptls->handshake_properties.client.early_data_acceptance==
407407
PTLS_EARLY_DATA_REJECTED) {
408408
rv=ngtcp2_conn_tls_early_data_rejected(conn);
@@ -540,7 +540,7 @@ static int set_additional_extensions(ptls_handshake_properties_t *hsprops,
540540
return-1;
541541
}
542542

543-
nwrite=ngtcp2_conn_encode_local_transport_params(conn, buf, buflen);
543+
nwrite=ngtcp2_conn_encode_local_transport_params2(conn, buf, buflen);
544544
if (nwrite<0) {
545545
goto fail;
546546
}
@@ -620,7 +620,7 @@ static int update_traffic_key_server_cb(ptls_update_traffic_key_t *self,
620620
* wait for the key to get the correct local transport
621621
* parameters from ngtcp2_conn.
622622
*/
623-
cptls=ngtcp2_conn_get_tls_native_handle(conn);
623+
cptls=ngtcp2_conn_get_tls_native_handle2(conn);
624624

625625
if (set_additional_extensions(&cptls->handshake_properties, conn) !=0) {
626626
return-1;

‎deps/ngtcp2/ngtcp2/crypto/quictls/quictls.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ int ngtcp2_crypto_hp_mask(uint8_t *dest, const ngtcp2_crypto_cipher *hp,
812812
intngtcp2_crypto_read_write_crypto_data(
813813
ngtcp2_conn*conn, ngtcp2_encryption_levelencryption_level,
814814
constuint8_t*data, size_tdatalen) {
815-
SSL*ssl=ngtcp2_conn_get_tls_native_handle(conn);
815+
SSL*ssl=ngtcp2_conn_get_tls_native_handle2(conn);
816816
intrv;
817817
interr;
818818

@@ -824,7 +824,7 @@ int ngtcp2_crypto_read_write_crypto_data(
824824
return-1;
825825
}
826826

827-
if (!ngtcp2_conn_get_handshake_completed(conn)) {
827+
if (!ngtcp2_conn_get_handshake_completed2(conn)) {
828828
rv=SSL_do_handshake(ssl);
829829
if (rv <= 0) {
830830
err=SSL_get_error(ssl, rv);

0 commit comments

Comments
 (0)