mirror of
https://github.com/openssl/openssl.git
synced 2025-03-01 19:28:10 +08:00
Make EVP_CIPHER_is_a() work with legacy cipher implementations too
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10008)
This commit is contained in:
parent
6ef81d388d
commit
776cb8358e
@ -504,6 +504,13 @@ int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx)
|
||||
|
||||
int EVP_CIPHER_is_a(const EVP_CIPHER *cipher, const char *name)
|
||||
{
|
||||
#ifndef FIPS_MODE
|
||||
if (cipher->prov == NULL) {
|
||||
int nid = EVP_CIPHER_nid(cipher);
|
||||
|
||||
return nid == OBJ_sn2nid(name) || nid == OBJ_ln2nid(name);
|
||||
}
|
||||
#endif
|
||||
return evp_is_a(cipher->prov, cipher->name_id, name);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user