diff --git a/ssl/tls13_enc.c b/ssl/tls13_enc.c index fa88de0584ca0..0e5e4de70a351 100644 --- a/ssl/tls13_enc.c +++ b/ssl/tls13_enc.c @@ -389,15 +389,13 @@ static int derive_secret_key_and_iv(SSL_CONNECTION *s, const EVP_MD *md, if (mode == EVP_CIPH_GCM_MODE) { *taglen = EVP_GCM_TLS_TAG_LEN; - } else if (strcmp(EVP_CIPHER_get0_name(ciph), SN_enull_hmac_sha256) - == 0) { + } else if (EVP_CIPHER_is_a(ciph, SN_enull_hmac_sha256)) { /* * SN_enull_hmac_sha256 must be consistent * with PROV_NAMES_ENULL_HMAC_SHA256 */ *taglen = EVP_HMACSHA256_TLS_TAG_LEN; - } else if (strcmp(EVP_CIPHER_get0_name(ciph), SN_enull_hmac_sha384) - == 0) { + } else if (EVP_CIPHER_is_a(ciph, SN_enull_hmac_sha384)) { /* * SN_enull_hmac_sha384 must be consistent * with PROV_NAMES_ENULL_HMAC_SHA384