Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1d00313

Browse filesBrowse files
jasnelladuh95
authored andcommitted
deps: update ngtcp2 to 1.14.0
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #59249 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 5556b15 commit 1d00313
Copy full SHA for 1d00313

39 files changed

+2,576-725Lines changed: 2576 additions & 725 deletions
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎deps/ngtcp2/README.md‎

Copy file name to clipboardExpand all lines: deps/ngtcp2/README.md
+6Lines changed: 6 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ $ cp -R lib/* ../node/deps/ngtcp2/ngtcp2/lib/
3636
$ cp -R crypto/* ../node/deps/ngtcp2/ngtcp2/crypto/
3737
```
3838

39+
Be sure to also update the `ngtcp2.gyp` file to reflect any changes in
40+
the source files or include directories.
41+
3942
### Updating nghttp3
4043

4144
To update nghttp3, replace `v0.7.0` with the desired git tag:
@@ -47,3 +50,6 @@ $ autoreconf -i
4750
$ ./configure --prefix=$PWD/build --enable-lib-only
4851
$ cp -R lib/* ../node/deps/ngtcp2/nghttp3/lib/
4952
```
53+
54+
Be sure to also update the `ngtcp2.gyp` file to reflect any changes in
55+
the source files or include directories.
Collapse file

‎deps/ngtcp2/ngtcp2.gyp‎

Copy file name to clipboardExpand all lines: deps/ngtcp2/ngtcp2.gyp
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
'ngtcp2/lib/ngtcp2_balloc.c',
1010
'ngtcp2/lib/ngtcp2_bbr.c',
1111
'ngtcp2/lib/ngtcp2_buf.c',
12+
'ngtcp2/lib/ngtcp2_callbacks.c',
1213
'ngtcp2/lib/ngtcp2_cc.c',
1314
'ngtcp2/lib/ngtcp2_cid.c',
1415
'ngtcp2/lib/ngtcp2_conn.c',
1516
'ngtcp2/lib/ngtcp2_conv.c',
16-
'ngtcp2/lib/ngtcp2_dcidtr.c',
1717
'ngtcp2/lib/ngtcp2_crypto.c',
18+
'ngtcp2/lib/ngtcp2_dcidtr.c',
1819
'ngtcp2/lib/ngtcp2_err.c',
1920
'ngtcp2/lib/ngtcp2_frame_chain.c',
2021
'ngtcp2/lib/ngtcp2_gaptr.c',
@@ -47,8 +48,8 @@
4748
'ngtcp2/lib/ngtcp2_window_filter.c',
4849
'ngtcp2/crypto/shared.c'
4950
],
50-
'ngtcp2_sources_quictls': [
51-
#'ngtcp2/crypto/quictls/quictls.c'
51+
'ngtcp2_sources_ossl': [
52+
'ngtcp2/crypto/ossl/ossl.c'
5253
],
5354
'ngtcp2_sources_boringssl': [
5455
'ngtcp2/crypto/boringssl/boringssl.c'
@@ -142,7 +143,7 @@
142143
},
143144
'sources': [
144145
'<@(ngtcp2_sources)',
145-
'<@(ngtcp2_sources_quictls)',
146+
'<@(ngtcp2_sources_ossl)',
146147
]
147148
},
148149
{
Collapse file

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

Copy file name to clipboardExpand all lines: deps/ngtcp2/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto.h
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ extern "C" {
6969
*/
7070
#define NGTCP2_CRYPTO_ERR_VERIFY_TOKEN -203
7171

72+
/**
73+
* @macro
74+
*
75+
* :macro:`NGTCP2_CRYPTO_ERR_NOMEM` indicates out of memory.
76+
*/
77+
#define NGTCP2_CRYPTO_ERR_NOMEM -501
78+
7279
/**
7380
* @function
7481
*
Collapse file
+198Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
/*
2+
* ngtcp2
3+
*
4+
* Copyright (c) 2025 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+
#ifndef NGTCP2_CRYPTO_OSSL_H
26+
#define NGTCP2_CRYPTO_OSSL_H
27+
28+
#include <ngtcp2/ngtcp2.h>
29+
30+
#include <openssl/ssl.h>
31+
32+
#ifdef __cplusplus
33+
extern "C" {
34+
#endif /* defined(__cplusplus) */
35+
36+
/**
37+
* @macrosection
38+
*
39+
* ossl specific error codes
40+
*/
41+
42+
/**
43+
* @macro
44+
*
45+
* :macro:`NGTCP2_CRYPTO_OSSL_ERR_TLS_WANT_X509_LOOKUP` is the error
46+
* code which indicates that TLS handshake routine is interrupted by
47+
* X509 certificate lookup. See :macro:`SSL_ERROR_WANT_X509_LOOKUP`
48+
* error description from `SSL_do_handshake`.
49+
*/
50+
#define NGTCP2_CRYPTO_OSSL_ERR_TLS_WANT_X509_LOOKUP -10001
51+
52+
/**
53+
* @macro
54+
*
55+
* :macro:`NGTCP2_CRYPTO_OSSL_ERR_TLS_WANT_CLIENT_HELLO_CB` is the
56+
* error code which indicates that TLS handshake routine is
57+
* interrupted by client hello callback. See
58+
* :macro:`SSL_ERROR_WANT_CLIENT_HELLO_CB` error description from
59+
* `SSL_do_handshake`.
60+
*/
61+
#define NGTCP2_CRYPTO_OSSL_ERR_TLS_WANT_CLIENT_HELLO_CB -10002
62+
63+
/**
64+
* @function
65+
*
66+
* `ngtcp2_crypto_ossl_from_ossl_encryption_level` translates
67+
* |ossl_level| to :type:`ngtcp2_encryption_level`. This function is
68+
* only available for ossl backend.
69+
*/
70+
NGTCP2_EXTERN ngtcp2_encryption_level
71+
ngtcp2_crypto_ossl_from_ossl_encryption_level(uint32_t ossl_level);
72+
73+
/**
74+
* @function
75+
*
76+
* `ngtcp2_crypto_ossl_from_ngtcp2_encryption_level` translates
77+
* |encryption_level| to OpenSSL encryption level. This function is
78+
* only available for ossl backend.
79+
*/
80+
NGTCP2_EXTERN uint32_t ngtcp2_crypto_ossl_from_ngtcp2_encryption_level(
81+
ngtcp2_encryption_level encryption_level);
82+
83+
/**
84+
* @struct
85+
*
86+
* :type:`ngtcp2_crypto_ossl_ctx` contains per-connection state, and
87+
* must be set to `ngtcp2_conn_set_tls_native_handle`.
88+
*/
89+
typedef struct ngtcp2_crypto_ossl_ctx ngtcp2_crypto_ossl_ctx;
90+
91+
/**
92+
* @function
93+
*
94+
* `ngtcp2_crypto_ossl_ctx_new` creates new
95+
* :type:`ngtcp2_crypto_ossl_ctx` object, and sets it to |*pctx| if it
96+
* succeeds.
97+
*
98+
* |ssl| is set to |*pctx|. It may be NULL, and in that case, call
99+
* `ngtcp2_crypto_ossl_ctx_set_ssl` later to set ``SSL`` object.
100+
*
101+
* This function returns 0 if it succeeds, or one of the following
102+
* negative error codes:
103+
*
104+
* :enum:`NGTCP2_CRYPTO_ERR_NOMEM`
105+
* Out of memory
106+
*/
107+
NGTCP2_EXTERN int ngtcp2_crypto_ossl_ctx_new(ngtcp2_crypto_ossl_ctx **pctx,
108+
SSL *ssl);
109+
110+
/**
111+
* @function
112+
*
113+
* `ngtcp2_crypto_ossl_ctx_del` frees resources allocated for |ctx|.
114+
* It also frees memory pointed by |ctx|.
115+
*/
116+
NGTCP2_EXTERN void ngtcp2_crypto_ossl_ctx_del(ngtcp2_crypto_ossl_ctx *ctx);
117+
118+
/**
119+
* @function
120+
*
121+
* `ngtcp2_crypto_ossl_ctx_set_ssl` sets |ssl| to |ctx|. This
122+
* function must be called after ``SSL`` object is created.
123+
*/
124+
NGTCP2_EXTERN void ngtcp2_crypto_ossl_ctx_set_ssl(ngtcp2_crypto_ossl_ctx *ctx,
125+
SSL *ssl);
126+
127+
/**
128+
* @function
129+
*
130+
* `ngtcp2_crypto_ossl_ctx_get_ssl` returns ``SSL`` object set to
131+
* |ctx|. If the object has not been set, this function returns NULL.
132+
*/
133+
NGTCP2_EXTERN SSL *ngtcp2_crypto_ossl_ctx_get_ssl(ngtcp2_crypto_ossl_ctx *ctx);
134+
135+
/**
136+
* @function
137+
*
138+
* `ngtcp2_crypto_ossl_init` initializes libngtcp2_crypto_ossl
139+
* library. This initialization is optional. It is highly
140+
* recommended to call this function before any use of
141+
* libngtcp2_crypto library API to workaround the performance
142+
* regression.
143+
*
144+
* This function returns 0 if it succeeds, or -1.
145+
*/
146+
NGTCP2_EXTERN int ngtcp2_crypto_ossl_init(void);
147+
148+
/**
149+
* @function
150+
*
151+
* `ngtcp2_crypto_ossl_configure_server_session` configures |ssl| for
152+
* server side QUIC connection. It performs the following
153+
* modifications:
154+
*
155+
* - Register callbacks via ``SSL_set_quic_tls_cbs``
156+
*
157+
* Application must set a pointer to :type:`ngtcp2_crypto_conn_ref` to
158+
* SSL object by calling SSL_set_app_data, and
159+
* :type:`ngtcp2_crypto_conn_ref` object must have
160+
* :member:`ngtcp2_crypto_conn_ref.get_conn` field assigned to get
161+
* :type:`ngtcp2_conn`.
162+
*
163+
* Application must call ``SSL_set_app_data(ssl, NULL)`` before
164+
* calling ``SSL_free(ssl)`` if you cannot make `ngtcp2_conn` object
165+
* alive until ``SSL_free`` is called.
166+
*
167+
* It returns 0 if it succeeds, or -1.
168+
*/
169+
NGTCP2_EXTERN int ngtcp2_crypto_ossl_configure_server_session(SSL *ssl);
170+
171+
/**
172+
* @function
173+
*
174+
* `ngtcp2_crypto_ossl_configure_client_session` configures |ssl| for
175+
* client side QUIC connection. It performs the following
176+
* modifications:
177+
*
178+
* - Register callbacks via ``SSL_set_quic_tls_cbs``
179+
*
180+
* Application must set a pointer to :type:`ngtcp2_crypto_conn_ref` to
181+
* SSL object by calling SSL_set_app_data, and
182+
* :type:`ngtcp2_crypto_conn_ref` object must have
183+
* :member:`ngtcp2_crypto_conn_ref.get_conn` field assigned to get
184+
* :type:`ngtcp2_conn`.
185+
*
186+
* Application must call ``SSL_set_app_data(ssl, NULL)`` before
187+
* calling ``SSL_free(ssl)`` if you cannot make `ngtcp2_conn` object
188+
* alive until ``SSL_free`` is called.
189+
*
190+
* It returns 0 if it succeeds, or -1.
191+
*/
192+
NGTCP2_EXTERN int ngtcp2_crypto_ossl_configure_client_session(SSL *ssl);
193+
194+
#ifdef __cplusplus
195+
}
196+
#endif /* defined(__cplusplus) */
197+
198+
#endif /* !defined(NGTCP2_CRYPTO_OSSL_H) */
Collapse file

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

Copy file name to clipboardExpand all lines: deps/ngtcp2/ngtcp2/crypto/includes/ngtcp2/ngtcp2_crypto_picotls.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern "C" {
3737
* @struct
3838
*
3939
* :type:`ngtcp2_crypto_picotls_ctx` contains per-connection state of
40-
* Picotls objects and must be an object to bet set to
40+
* Picotls object, and must be set to
4141
* `ngtcp2_conn_set_tls_native_handle`.
4242
*/
4343
typedef struct ngtcp2_crypto_picotls_ctx {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.