summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2021-04-13 21:01:20 +0900
committerDaniel Stenberg <daniel@haxx.se>2021-04-13 14:22:32 +0200
commitf141b0bbf78c818e0fd6ea6782ec718e4a9055c0 (patch)
tree22aef0aa89b0de528b930080d57cf63df32943cc
parent0409c12ae7ee5bdadcc31240e8bd405af43ec297 (diff)
downloadcurl-f141b0bbf78c818e0fd6ea6782ec718e4a9055c0.tar.gz
ngtcp2: Use ALPN h3-29 for now
Fixes #6864 Cloes #6886
-rw-r--r--lib/vquic/ngtcp2.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c
index 69dd14074..3d6451998 100644
--- a/lib/vquic/ngtcp2.c
+++ b/lib/vquic/ngtcp2.c
@@ -57,6 +57,8 @@
#define H3BUGF(x) do { } while(0)
#endif
+#define H3_ALPN_H3_29 "\x5h3-29"
+
/*
* This holds outgoing HTTP/3 stream data that is used by nghttp3 until acked.
* It is used as a circular buffer. Add new bytes at the end until it reaches
@@ -351,8 +353,8 @@ static int quic_init_ssl(struct quicsocket *qs)
SSL_set_app_data(qs->ssl, qs);
SSL_set_connect_state(qs->ssl);
- alpn = (const uint8_t *)NGHTTP3_ALPN_H3;
- alpnlen = sizeof(NGHTTP3_ALPN_H3) - 1;
+ alpn = (const uint8_t *)H3_ALPN_H3_29;
+ alpnlen = sizeof(H3_ALPN_H3_29) - 1;
if(alpn)
SSL_set_alpn_protos(qs->ssl, alpn, (int)alpnlen);
@@ -529,8 +531,8 @@ static int quic_init_ssl(struct quicsocket *qs)
}
/* strip the first byte (the length) from NGHTTP3_ALPN_H3 */
- alpn.data = (unsigned char *)NGHTTP3_ALPN_H3 + 1;
- alpn.size = sizeof(NGHTTP3_ALPN_H3) - 2;
+ alpn.data = (unsigned char *)H3_ALPN_H3_29 + 1;
+ alpn.size = sizeof(H3_ALPN_H3_29) - 2;
if(alpn.data)
gnutls_alpn_set_protocols(qs->ssl, &alpn, 1, 0);