]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ngtcp2: Use ALPN h3-29 for now
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
Tue, 13 Apr 2021 12:01:20 +0000 (21:01 +0900)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 13 Apr 2021 12:22:32 +0000 (14:22 +0200)
Fixes #6864
Cloes #6886

lib/vquic/ngtcp2.c

index 69dd14074f011a586c0715c10a491e477f33d04c..3d645199876fdb592f71c4b08d65fed77da9e2bc 100644 (file)
@@ -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);