summaryrefslogtreecommitdiffstats
path: root/include/crypto/evp.h
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2019-11-01 14:13:49 +0000
committerMatt Caswell <matt@openssl.org>2019-11-06 10:11:31 +0000
commit7606bed9047935d0e3c0b5ede9d4ce92a136b5e2 (patch)
tree6f65b6e46717981d7580bdc5f90658dc53a0405e /include/crypto/evp.h
parent6af1b11848f000c900877f1289a42948d415f21c (diff)
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)
Diffstat (limited to 'include/crypto/evp.h')
-rw-r--r--include/crypto/evp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/crypto/evp.h b/include/crypto/evp.h
index dfbcf149de..8f8def2655 100644
--- a/include/crypto/evp.h
+++ b/include/crypto/evp.h
@@ -622,3 +622,6 @@ void evp_encode_ctx_set_flags(EVP_ENCODE_CTX *ctx, unsigned int flags);
#define EVP_ENCODE_CTX_NO_NEWLINES 1
/* Use the SRP base64 alphabet instead of the standard one */
#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2
+
+const EVP_CIPHER *evp_get_cipherbyname_ex(OPENSSL_CTX *libctx, const char *name);
+const EVP_MD *evp_get_digestbyname_ex(OPENSSL_CTX *libctx, const char *name);