Remove SSL_CIPHER_get_value

Update-Note: SSL_CIPHER_get_value was our original name for the
function. OpenSSL later called it SSL_CIPHER_get_protocol_id. I believe
all external callers have since been updated to use the new function.
(If I missed a few stragglers, replace with SSL_CIPHER_get_protocol_id
to fix.)

Change-Id: I956fb49bf2d13a898eed73177493d2c8d50778ad
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/60205
Reviewed-by: Bob Beck <bbe@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
This commit is contained in:
David Benjamin
2023-05-31 08:43:45 +00:00
committed by Boringssl LUCI CQ
parent b0a026f854
commit 4631ccc1bf
3 changed files with 2 additions and 14 deletions
-7
View File
@@ -5244,13 +5244,6 @@ OPENSSL_EXPORT int SSL_CTX_set_tlsext_status_arg(SSL_CTX *ctx, void *arg);
SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_HASH_VALUE
#define SSL_R_TLSV1_CERTIFICATE_REQUIRED SSL_R_TLSV1_ALERT_CERTIFICATE_REQUIRED
// SSL_CIPHER_get_value calls |SSL_CIPHER_get_protocol_id|.
//
// TODO(davidben): |SSL_CIPHER_get_value| was our name for this function, but
// upstream added it as |SSL_CIPHER_get_protocol_id|. Switch callers to the new
// name and remove this one.
OPENSSL_EXPORT uint16_t SSL_CIPHER_get_value(const SSL_CIPHER *cipher);
// Compliance policy configurations
//
-4
View File
@@ -1370,10 +1370,6 @@ uint16_t SSL_CIPHER_get_protocol_id(const SSL_CIPHER *cipher) {
return static_cast<uint16_t>(cipher->id);
}
uint16_t SSL_CIPHER_get_value(const SSL_CIPHER *cipher) {
return SSL_CIPHER_get_protocol_id(cipher);
}
int SSL_CIPHER_is_aead(const SSL_CIPHER *cipher) {
return (cipher->algorithm_mac & SSL_AEAD) != 0;
}
+2 -3
View File
@@ -198,9 +198,8 @@ static enum ssl_hs_wait_t do_read_hello_retry_request(SSL_HANDSHAKE *hs) {
if (cipher == nullptr ||
SSL_CIPHER_get_min_version(cipher) > ssl_protocol_version(ssl) ||
SSL_CIPHER_get_max_version(cipher) < ssl_protocol_version(ssl) ||
!ssl_tls13_cipher_meets_policy(
SSL_CIPHER_get_value(cipher),
ssl->config->tls13_cipher_policy)) {
!ssl_tls13_cipher_meets_policy(SSL_CIPHER_get_protocol_id(cipher),
ssl->config->tls13_cipher_policy)) {
OPENSSL_PUT_ERROR(SSL, SSL_R_WRONG_CIPHER_RETURNED);
ssl_send_alert(ssl, SSL3_AL_FATAL, SSL_AD_ILLEGAL_PARAMETER);
return ssl_hs_error;