diff --git a/examples/client.cc b/examples/client.cc index 6b55190e18696df101cdb6b376e9401c527028eb..6f6f5fad872e56bb4136194c6b7570f1cf0a6835 100644 --- a/examples/client.cc +++ b/examples/client.cc @@ -832,9 +832,9 @@ int Client::init_ssl() { size_t alpnlen; switch (version_) { - case NGTCP2_PROTO_VER_D18: - alpn = reinterpret_cast<const uint8_t *>(NGTCP2_ALPN_D18); - alpnlen = str_size(NGTCP2_ALPN_D18); + case NGTCP2_PROTO_VER_D19: + alpn = reinterpret_cast<const uint8_t *>(NGTCP2_ALPN_D19); + alpnlen = str_size(NGTCP2_ALPN_D19); break; } if (alpn) { @@ -2526,7 +2526,7 @@ void config_set_default(Config &config) { config.nstreams = 1; config.data = nullptr; config.datalen = 0; - config.version = NGTCP2_PROTO_VER_D18; + config.version = NGTCP2_PROTO_VER_D19; config.timeout = 30; } } // namespace diff --git a/examples/server.cc b/examples/server.cc index b3998f0fd32bcfb582ca61fe746e740fa957af9e..67aa4daefb57c275f98f1ce52034f6b1c4202ef1 100644 --- a/examples/server.cc +++ b/examples/server.cc @@ -2469,7 +2469,7 @@ int Server::send_version_negotiation(const ngtcp2_pkt_hd *chd, Endpoint &ep, std::array<uint32_t, 2> sv; sv[0] = generate_reserved_version(sa, salen, chd->version); - sv[1] = NGTCP2_PROTO_VER_D18; + sv[1] = NGTCP2_PROTO_VER_D19; auto nwrite = ngtcp2_pkt_write_version_negotiation( buf.wpos(), buf.left(), @@ -2830,9 +2830,9 @@ int alpn_select_proto_cb(SSL *ssl, const unsigned char **out, auto version = ngtcp2_conn_get_negotiated_version(h->conn()); switch (version) { - case NGTCP2_PROTO_VER_D18: - alpn = reinterpret_cast<const uint8_t *>(NGTCP2_ALPN_D18); - alpnlen = str_size(NGTCP2_ALPN_D18); + case NGTCP2_PROTO_VER_D19: + alpn = reinterpret_cast<const uint8_t *>(NGTCP2_ALPN_D19); + alpnlen = str_size(NGTCP2_ALPN_D19); break; default: if (!config.quiet) { @@ -2854,7 +2854,7 @@ int alpn_select_proto_cb(SSL *ssl, const unsigned char **out, *outlen = alpn[0]; if (!config.quiet) { - std::cerr << "Client did not present ALPN " << NGTCP2_ALPN_D18 + 1 + std::cerr << "Client did not present ALPN " << NGTCP2_ALPN_D19 + 1 << std::endl; } @@ -2881,7 +2881,7 @@ int transport_params_add_cb(SSL *ssl, unsigned int ext_type, } params.v.ee.len = 1; - params.v.ee.supported_versions[0] = NGTCP2_PROTO_VER_D18; + params.v.ee.supported_versions[0] = NGTCP2_PROTO_VER_D19; constexpr size_t bufsize = 512; auto buf = std::make_unique<uint8_t[]>(bufsize); diff --git a/lib/includes/ngtcp2/ngtcp2.h b/lib/includes/ngtcp2/ngtcp2.h index c364577a5b67097d56b9bdf85c16d4f23aff1c7f..8fe2762754266182e249cea7d96b536fd667d2ac 100644 --- a/lib/includes/ngtcp2/ngtcp2.h +++ b/lib/includes/ngtcp2/ngtcp2.h @@ -155,16 +155,16 @@ typedef struct { ngtcp2_realloc realloc; } ngtcp2_mem; -/* NGTCP2_PROTO_VER_D18 is the supported QUIC protocol version. */ -#define NGTCP2_PROTO_VER_D18 0xff000012u +/* NGTCP2_PROTO_VER_D19 is the supported QUIC protocol version. */ +#define NGTCP2_PROTO_VER_D19 0xff000013u /* NGTCP2_PROTO_VER_MAX is the highest QUIC version the library supports. */ -#define NGTCP2_PROTO_VER_MAX NGTCP2_PROTO_VER_D18 +#define NGTCP2_PROTO_VER_MAX NGTCP2_PROTO_VER_D19 /* NGTCP2_ALPN_* is a serialized form of ALPN protocol identifier this library supports. Notice that the first byte is the length of the following protocol identifier. */ -#define NGTCP2_ALPN_D18 "\x5hq-18" +#define NGTCP2_ALPN_D19 "\x5hq-19" #define NGTCP2_MAX_PKTLEN_IPV4 1252 #define NGTCP2_MAX_PKTLEN_IPV6 1232 diff --git a/lib/ngtcp2_conn.c b/lib/ngtcp2_conn.c index 2b348d1701d5208fe6d77a17034c3ad0e682edf1..2367f754346c94e6f4002390251ea3b1d425b0f4 100644 --- a/lib/ngtcp2_conn.c +++ b/lib/ngtcp2_conn.c @@ -7246,7 +7246,7 @@ int ngtcp2_accept(ngtcp2_pkt_hd *dest, const uint8_t *pkt, size_t pktlen) { } switch (p->version) { - case NGTCP2_PROTO_VER_D18: + case NGTCP2_PROTO_VER_D19: break; default: return 1; diff --git a/tests/ngtcp2_pkt_test.c b/tests/ngtcp2_pkt_test.c index 4882b00be90e15608169d02d5eb80937b22db407..2215d818157f8a89e3ddb9a2bcdcf43f4fbb4cad 100644 --- a/tests/ngtcp2_pkt_test.c +++ b/tests/ngtcp2_pkt_test.c @@ -1068,7 +1068,7 @@ void test_ngtcp2_pkt_write_retry(void) { } ngtcp2_pkt_hd_init(&hd, NGTCP2_PKT_FLAG_LONG_FORM, NGTCP2_PKT_RETRY, &dcid, - &scid, 0, 0, NGTCP2_PROTO_VER_D18, 0); + &scid, 0, 0, NGTCP2_PROTO_VER_D19, 0); spktlen = ngtcp2_pkt_write_retry(buf, sizeof(buf), &hd, &odcid, token, sizeof(token));