Ensure EVP_get_digestbyname() and EVP_get_cipherbyname() know all aliases
authorMatt Caswell <matt@openssl.org>
Fri, 1 Nov 2019 14:13:49 +0000 (14:13 +0000)
committerMatt Caswell <matt@openssl.org>
Wed, 6 Nov 2019 10:11:31 +0000 (10:11 +0000)
commit7606bed9047935d0e3c0b5ede9d4ce92a136b5e2
tree6f65b6e46717981d7580bdc5f90658dc53a0405e
parent6af1b11848f000c900877f1289a42948d415f21c
Ensure EVP_get_digestbyname() and EVP_get_cipherbyname() know all aliases

Now that we have an EVP namemap containing all aliases that providers
know about for any given algorithm, it is possible that an application
attempts to look up a digest or a cipher via EVP_get_digestbyname() or
EVP_get_cipherbyname() with an algorithm name that is unknown to the
legacy method database. Therefore we extend those functions to
additionally check the aliases in the namemap when searching for a
method in the event that our initial lookup attempt fails.

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10324)
crypto/evp/names.c
crypto/evp/pmeth_lib.c
include/crypto/evp.h