More alignment with OpenSSL on TLS 1.3 cipher suite constants.

Our TLS 1.3 stack predates OpenSSL's. We chose TLS1_TXT_* to align with
the existing names. OpenSSL made a new convention, TLS1_3_RFC_*. Match
them.

Similar to 53425

Change-Id: I8737d98c9c1d5c201c4726739ddcbe96123d9370
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/53445
Commit-Queue: Bob Beck <bbe@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
chromium-5359
Bob Beck 3 years ago committed by Boringssl LUCI CQ
parent dfddbc4ded
commit a6981a3383
  1. 11
      include/openssl/tls1.h
  2. 6
      ssl/ssl_cipher.cc

@ -630,10 +630,15 @@ extern "C" {
"ECDHE-PSK-CHACHA20-POLY1305"
// TLS 1.3 ciphersuites from RFC 8446.
#define TLS1_TXT_AES_128_GCM_SHA256 "TLS_AES_128_GCM_SHA256"
#define TLS1_TXT_AES_256_GCM_SHA384 "TLS_AES_256_GCM_SHA384"
#define TLS1_TXT_CHACHA20_POLY1305_SHA256 "TLS_CHACHA20_POLY1305_SHA256"
#define TLS1_3_RFC_AES_128_GCM_SHA256 "TLS_AES_128_GCM_SHA256"
#define TLS1_3_RFC_AES_256_GCM_SHA384 "TLS_AES_256_GCM_SHA384"
#define TLS1_3_RFC_CHACHA20_POLY1305_SHA256 "TLS_CHACHA20_POLY1305_SHA256"
// The following constants are legacy aliases of |TLS1_3_CK_*|.
// TODO(bbe): Migrate callers to the new name and remove these.
#define TLS1_TXT_AES_128_GCM_SHA256 TLS1_3_RFC_AES_128_GCM_SHA256
#define TLS1_TXT_AES_256_GCM_SHA384 TLS1_3_RFC_AES_256_GCM_SHA384
#define TLS1_TXT_CHACHA20_POLY1305_SHA256 TLS1_3_RFC_CHACHA20_POLY1305_SHA256
#define TLS_CT_RSA_SIGN 1
#define TLS_CT_DSS_SIGN 2

@ -264,7 +264,7 @@ static constexpr SSL_CIPHER kCiphers[] = {
// Cipher 1301
{
TLS1_TXT_AES_128_GCM_SHA256,
TLS1_3_RFC_AES_128_GCM_SHA256,
"TLS_AES_128_GCM_SHA256",
TLS1_3_CK_AES_128_GCM_SHA256,
SSL_kGENERIC,
@ -276,7 +276,7 @@ static constexpr SSL_CIPHER kCiphers[] = {
// Cipher 1302
{
TLS1_TXT_AES_256_GCM_SHA384,
TLS1_3_RFC_AES_256_GCM_SHA384,
"TLS_AES_256_GCM_SHA384",
TLS1_3_CK_AES_256_GCM_SHA384,
SSL_kGENERIC,
@ -288,7 +288,7 @@ static constexpr SSL_CIPHER kCiphers[] = {
// Cipher 1303
{
TLS1_TXT_CHACHA20_POLY1305_SHA256,
TLS1_3_RFC_CHACHA20_POLY1305_SHA256,
"TLS_CHACHA20_POLY1305_SHA256",
TLS1_3_CK_CHACHA20_POLY1305_SHA256,
SSL_kGENERIC,

Loading…
Cancel
Save