BEGIN_PUBLIC Switch to OpenSSL-compatible names for `TLS1_CK_*` constants BoringSSL implemented TLS 1.3 first and named the constants `TLS1_CK_FOO`, to match the existing OpenSSL naming convention. When OpenSSL later implemented TLS 1.3, they decided to break their own convention and use `TLS1_3_CK_FOO` for these ciphers. BoringSSL then switched to those names but has kept `TLS1_CK_FOO` as compatibility for code that was written against the original BoringSSL names. Migrate to the OpenSSL names, just so we don't need to keep both names around. END_PUBLIC PiperOrigin-RevId: 895624174
diff --git a/quiche/quic/core/crypto/aes_128_gcm_12_decrypter.cc b/quiche/quic/core/crypto/aes_128_gcm_12_decrypter.cc index 7842508..7996808 100644 --- a/quiche/quic/core/crypto/aes_128_gcm_12_decrypter.cc +++ b/quiche/quic/core/crypto/aes_128_gcm_12_decrypter.cc
@@ -27,7 +27,7 @@ Aes128Gcm12Decrypter::~Aes128Gcm12Decrypter() {} uint32_t Aes128Gcm12Decrypter::cipher_id() const { - return TLS1_CK_AES_128_GCM_SHA256; + return TLS1_3_CK_AES_128_GCM_SHA256; } } // namespace quic
diff --git a/quiche/quic/core/crypto/aes_128_gcm_decrypter.cc b/quiche/quic/core/crypto/aes_128_gcm_decrypter.cc index de3e6de..30fd3bf 100644 --- a/quiche/quic/core/crypto/aes_128_gcm_decrypter.cc +++ b/quiche/quic/core/crypto/aes_128_gcm_decrypter.cc
@@ -29,7 +29,7 @@ Aes128GcmDecrypter::~Aes128GcmDecrypter() {} uint32_t Aes128GcmDecrypter::cipher_id() const { - return TLS1_CK_AES_128_GCM_SHA256; + return TLS1_3_CK_AES_128_GCM_SHA256; } } // namespace quic
diff --git a/quiche/quic/core/crypto/aes_256_gcm_decrypter.cc b/quiche/quic/core/crypto/aes_256_gcm_decrypter.cc index 8aa15f1..3505cee 100644 --- a/quiche/quic/core/crypto/aes_256_gcm_decrypter.cc +++ b/quiche/quic/core/crypto/aes_256_gcm_decrypter.cc
@@ -29,7 +29,7 @@ Aes256GcmDecrypter::~Aes256GcmDecrypter() {} uint32_t Aes256GcmDecrypter::cipher_id() const { - return TLS1_CK_AES_256_GCM_SHA384; + return TLS1_3_CK_AES_256_GCM_SHA384; } } // namespace quic
diff --git a/quiche/quic/core/crypto/chacha20_poly1305_decrypter.cc b/quiche/quic/core/crypto/chacha20_poly1305_decrypter.cc index 9903118..ded4aeb 100644 --- a/quiche/quic/core/crypto/chacha20_poly1305_decrypter.cc +++ b/quiche/quic/core/crypto/chacha20_poly1305_decrypter.cc
@@ -33,7 +33,7 @@ ChaCha20Poly1305Decrypter::~ChaCha20Poly1305Decrypter() {} uint32_t ChaCha20Poly1305Decrypter::cipher_id() const { - return TLS1_CK_CHACHA20_POLY1305_SHA256; + return TLS1_3_CK_CHACHA20_POLY1305_SHA256; } QuicPacketCount ChaCha20Poly1305Decrypter::GetIntegrityLimit() const {
diff --git a/quiche/quic/core/crypto/chacha20_poly1305_tls_decrypter.cc b/quiche/quic/core/crypto/chacha20_poly1305_tls_decrypter.cc index 0fcc2ea..56cd837 100644 --- a/quiche/quic/core/crypto/chacha20_poly1305_tls_decrypter.cc +++ b/quiche/quic/core/crypto/chacha20_poly1305_tls_decrypter.cc
@@ -33,7 +33,7 @@ ChaCha20Poly1305TlsDecrypter::~ChaCha20Poly1305TlsDecrypter() {} uint32_t ChaCha20Poly1305TlsDecrypter::cipher_id() const { - return TLS1_CK_CHACHA20_POLY1305_SHA256; + return TLS1_3_CK_CHACHA20_POLY1305_SHA256; } QuicPacketCount ChaCha20Poly1305TlsDecrypter::GetIntegrityLimit() const {
diff --git a/quiche/quic/core/crypto/quic_decrypter.cc b/quiche/quic/core/crypto/quic_decrypter.cc index 5399647..06da896 100644 --- a/quiche/quic/core/crypto/quic_decrypter.cc +++ b/quiche/quic/core/crypto/quic_decrypter.cc
@@ -49,11 +49,11 @@ std::unique_ptr<QuicDecrypter> QuicDecrypter::CreateFromCipherSuite( uint32_t cipher_suite) { switch (cipher_suite) { - case TLS1_CK_AES_128_GCM_SHA256: + case TLS1_3_CK_AES_128_GCM_SHA256: return std::make_unique<Aes128GcmDecrypter>(); - case TLS1_CK_AES_256_GCM_SHA384: + case TLS1_3_CK_AES_256_GCM_SHA384: return std::make_unique<Aes256GcmDecrypter>(); - case TLS1_CK_CHACHA20_POLY1305_SHA256: + case TLS1_3_CK_CHACHA20_POLY1305_SHA256: return std::make_unique<ChaCha20Poly1305TlsDecrypter>(); default: QUIC_BUG(quic_bug_10660_1) << "TLS cipher suite is unknown to QUIC";
diff --git a/quiche/quic/core/crypto/quic_encrypter.cc b/quiche/quic/core/crypto/quic_encrypter.cc index be795be..7e64e07 100644 --- a/quiche/quic/core/crypto/quic_encrypter.cc +++ b/quiche/quic/core/crypto/quic_encrypter.cc
@@ -46,11 +46,11 @@ std::unique_ptr<QuicEncrypter> QuicEncrypter::CreateFromCipherSuite( uint32_t cipher_suite) { switch (cipher_suite) { - case TLS1_CK_AES_128_GCM_SHA256: + case TLS1_3_CK_AES_128_GCM_SHA256: return std::make_unique<Aes128GcmEncrypter>(); - case TLS1_CK_AES_256_GCM_SHA384: + case TLS1_3_CK_AES_256_GCM_SHA384: return std::make_unique<Aes256GcmEncrypter>(); - case TLS1_CK_CHACHA20_POLY1305_SHA256: + case TLS1_3_CK_CHACHA20_POLY1305_SHA256: return std::make_unique<ChaCha20Poly1305TlsEncrypter>(); default: QUIC_BUG(quic_bug_10711_1) << "TLS cipher suite is unknown to QUIC";