ngtcp2: fix QUIC transport parameter version

fix inappropriate version setting for QUIC transport parameters.
this patch keeps curl with ngtcp2 uses QUIC draft version (h3-29).

Closes #7771
This commit is contained in:
Jun-ya Kato 2021-09-15 13:38:24 +00:00 committed by Daniel Stenberg
parent 5c4e46c724
commit 4a10a99ef0
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -303,6 +303,7 @@ static int quic_init_ssl(struct quicsocket *qs)
SSL_set_app_data(qs->ssl, qs);
SSL_set_connect_state(qs->ssl);
SSL_set_quic_use_legacy_codepoint(qs->ssl, 1);
alpn = (const uint8_t *)H3_ALPN_H3_29;
alpnlen = sizeof(H3_ALPN_H3_29) - 1;
@ -439,12 +440,10 @@ static int quic_init_ssl(struct quicsocket *qs)
gnutls_alert_set_read_function(qs->ssl, alert_read_func);
rc = gnutls_session_ext_register(qs->ssl, "QUIC Transport Parameters",
0xffa5, GNUTLS_EXT_TLS,
tp_recv_func, tp_send_func,
NULL, NULL, NULL,
GNUTLS_EXT_FLAG_TLS |
GNUTLS_EXT_FLAG_CLIENT_HELLO |
GNUTLS_EXT_FLAG_EE);
NGTCP2_TLSEXT_QUIC_TRANSPORT_PARAMETERS_DRAFT, GNUTLS_EXT_TLS,
tp_recv_func, tp_send_func, NULL, NULL, NULL,
GNUTLS_EXT_FLAG_TLS | GNUTLS_EXT_FLAG_CLIENT_HELLO |
GNUTLS_EXT_FLAG_EE);
if(rc < 0) {
H3BUGF(fprintf(stderr, "gnutls_session_ext_register failed: %s\n",
gnutls_strerror(rc)));