diff --git a/src/shrpx_http3_upstream.cc b/src/shrpx_http3_upstream.cc index 68775eb2..4010e098 100644 --- a/src/shrpx_http3_upstream.cc +++ b/src/shrpx_http3_upstream.cc @@ -221,7 +221,7 @@ int get_new_connection_id(ngtcp2_conn *conn, ngtcp2_cid *cid, uint8_t *token, auto config = get_config(); auto &quicconf = config->quic; - if (generate_encrypted_quic_connection_id( + if (generate_quic_connection_id( *cid, cidlen, worker->get_cid_prefix(), quicconf.upstream.cid_encryption_key.data()) != 0) { return NGTCP2_ERR_CALLBACK_FAILURE; @@ -559,7 +559,7 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr, ngtcp2_cid scid; - if (generate_encrypted_quic_connection_id( + if (generate_quic_connection_id( scid, SHRPX_QUIC_SCIDLEN, worker->get_cid_prefix(), quicconf.upstream.cid_encryption_key.data()) != 0) { return -1; diff --git a/src/shrpx_quic.cc b/src/shrpx_quic.cc index bf313909..529cde57 100644 --- a/src/shrpx_quic.cc +++ b/src/shrpx_quic.cc @@ -161,9 +161,8 @@ int generate_quic_retry_connection_id(ngtcp2_cid &cid, size_t cidlen, return encrypt_quic_connection_id(p, p, key); } -int generate_encrypted_quic_connection_id(ngtcp2_cid &cid, size_t cidlen, - const uint8_t *cid_prefix, - const uint8_t *key) { +int generate_quic_connection_id(ngtcp2_cid &cid, size_t cidlen, + const uint8_t *cid_prefix, const uint8_t *key) { assert(cidlen == SHRPX_QUIC_SCIDLEN); if (RAND_bytes(cid.data, cidlen) != 1) { diff --git a/src/shrpx_quic.h b/src/shrpx_quic.h index 846d5a83..52a4d67a 100644 --- a/src/shrpx_quic.h +++ b/src/shrpx_quic.h @@ -85,9 +85,8 @@ int generate_quic_retry_connection_id(ngtcp2_cid &cid, size_t cidlen, const uint8_t *server_id, const uint8_t *key); -int generate_encrypted_quic_connection_id(ngtcp2_cid &cid, size_t cidlen, - const uint8_t *cid_prefix, - const uint8_t *key); +int generate_quic_connection_id(ngtcp2_cid &cid, size_t cidlen, + const uint8_t *cid_prefix, const uint8_t *key); int encrypt_quic_connection_id(uint8_t *dest, const uint8_t *src, const uint8_t *key);