diff options
author | Jun-ya Kato <kato@win6.jp> | 2021-09-15 13:38:24 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-09-25 16:06:13 +0200 |
commit | 4a10a99ef03bc6ad2b01546f95c8a23435c23f94 (patch) | |
tree | aed7d88fea7694b1572f6c0b422142f7629d7f51 /lib/vquic | |
parent | 5c4e46c724fed8c3672bcec06af1f9f5f7611d23 (diff) | |
download | curl-4a10a99ef03bc6ad2b01546f95c8a23435c23f94.tar.gz |
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
Diffstat (limited to 'lib/vquic')
-rw-r--r-- | lib/vquic/ngtcp2.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c index 9fcfe81a8..6f15ceda0 100644 --- a/lib/vquic/ngtcp2.c +++ b/lib/vquic/ngtcp2.c @@ -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))); |