Skip to content

Commit

Permalink
ngtcp2: Send ALPN h3-22
Browse files Browse the repository at this point in the history
Closes #4212
  • Loading branch information
tatsuhiro-t authored and bagder committed Aug 11, 2019
1 parent f49abd1 commit 86ae740
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/vquic/ngtcp2.c
Expand Up @@ -586,10 +586,10 @@ static int quic_init_ssl(struct connectdata *conn)
SSL_set_key_callback(qs->ssl, ssl_key_cb, conn);

switch(qs->version) {
#ifdef NGTCP2_PROTO_VER_D17
case NGTCP2_PROTO_VER_D17:
alpn = (const uint8_t *)NGTCP2_ALPN_D17;
alpnlen = strlen(NGTCP2_ALPN_D17);
#ifdef NGTCP2_PROTO_VER
case NGTCP2_PROTO_VER:
alpn = (const uint8_t *)NGTCP2_ALPN_H3;
alpnlen = sizeof(NGTCP2_ALPN_H3) - 1;
break;
#endif
}
Expand Down Expand Up @@ -997,6 +997,7 @@ CURLcode Curl_quic_connect(struct connectdata *conn,
(void)addrlen;
infof(conn->data, "Connecting socket %d over QUIC\n", sockfd);

qs->version = NGTCP2_PROTO_VER;
qs->sslctx = quic_ssl_ctx(conn->data);
if(!qs->sslctx)
return CURLE_FAILED_INIT; /* TODO: better return code */
Expand Down

0 comments on commit 86ae740

Please sign in to comment.