Skip to content

Commit

Permalink
[ssl] Prefer SSL_k(EC)?DHE to the SSL_kE(EC)?DH alias
Browse files Browse the repository at this point in the history
`SSL_kECDHE` and `SSL_kEECDH`, and `SSL_kDHE` and `SSL_kEDH` are already
marked as aliases of each other in the headers.
This commit, for each pair, replaces the leftover uses of the latter
synonym with the first one, which is considered more common.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #17763)
  • Loading branch information
romen committed Mar 1, 2022
1 parent d2d2401 commit 66914fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions ssl/s3_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2168,7 +2168,7 @@ static SSL_CIPHER ssl3_ciphers[] = {
TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256,
TLS1_RFC_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256,
TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256,
SSL_kEDH,
SSL_kDHE,
SSL_aDSS,
SSL_CAMELLIA128,
SSL_SHA256,
Expand All @@ -2184,7 +2184,7 @@ static SSL_CIPHER ssl3_ciphers[] = {
TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
TLS1_RFC_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
SSL_kEDH,
SSL_kDHE,
SSL_aRSA,
SSL_CAMELLIA128,
SSL_SHA256,
Expand All @@ -2200,7 +2200,7 @@ static SSL_CIPHER ssl3_ciphers[] = {
TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA256,
TLS1_RFC_ADH_WITH_CAMELLIA_128_CBC_SHA256,
TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA256,
SSL_kEDH,
SSL_kDHE,
SSL_aNULL,
SSL_CAMELLIA128,
SSL_SHA256,
Expand Down Expand Up @@ -2232,7 +2232,7 @@ static SSL_CIPHER ssl3_ciphers[] = {
TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256,
TLS1_RFC_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256,
TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256,
SSL_kEDH,
SSL_kDHE,
SSL_aDSS,
SSL_CAMELLIA256,
SSL_SHA256,
Expand All @@ -2248,7 +2248,7 @@ static SSL_CIPHER ssl3_ciphers[] = {
TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
TLS1_RFC_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
SSL_kEDH,
SSL_kDHE,
SSL_aRSA,
SSL_CAMELLIA256,
SSL_SHA256,
Expand All @@ -2264,7 +2264,7 @@ static SSL_CIPHER ssl3_ciphers[] = {
TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA256,
TLS1_RFC_ADH_WITH_CAMELLIA_256_CBC_SHA256,
TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA256,
SSL_kEDH,
SSL_kDHE,
SSL_aNULL,
SSL_CAMELLIA256,
SSL_SHA256,
Expand Down
2 changes: 1 addition & 1 deletion ssl/ssl_cert.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ static int ssl_security_default_callback(const SSL *s, const SSL_CTX *ctx,
return 0;
/* Level 3: forward secure ciphersuites only */
if (level >= 3 && c->min_tls != TLS1_3_VERSION &&
!(c->algorithm_mkey & (SSL_kEDH | SSL_kEECDH)))
!(c->algorithm_mkey & (SSL_kDHE | SSL_kECDHE)))
return 0;
break;
}
Expand Down

0 comments on commit 66914fc

Please sign in to comment.