summaryrefslogtreecommitdiffstats
path: root/crypto/evp/evp_locl.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-09-21 20:57:51 +0200
committerRichard Levitte <levitte@openssl.org>2019-09-23 09:13:25 +0200
commit320408382046db015c9a9cc04ae91c2bcd0e5c4c (patch)
tree46d9721a3d9ce06444f5052bedcd334f38d94315 /crypto/evp/evp_locl.h
parentinclude/openssl/macros.h: better OPENSSL_FUNC fallback (diff)
downloadopenssl-320408382046db015c9a9cc04ae91c2bcd0e5c4c.tar.xz
openssl-320408382046db015c9a9cc04ae91c2bcd0e5c4c.zip
Rework cipher / digest fetching for legacy nids with multiple name support
With multiple names, it's no longer viable to just grab the "first" in the set and use that to find the legacy NID. Instead, all names for an algorithm must be checked, and if we encounter more than one NID asssociated with those names, we consider it an error and make that method unloadable. This ensures that all methods that do have an internal NID associated will get that NID in their structure, thereby ensuring that other parts of libcrypto that haven't gone away from using NIDs for comparison will continue to work as expected. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9969)
Diffstat (limited to '')
-rw-r--r--crypto/evp/evp_locl.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/evp/evp_locl.h b/crypto/evp/evp_locl.h
index 3437e04b67..116c8e6ce0 100644
--- a/crypto/evp/evp_locl.h
+++ b/crypto/evp/evp_locl.h
@@ -251,3 +251,6 @@ void evp_pkey_ctx_free_old_ops(EVP_PKEY_CTX *ctx);
/* OSSL_PROVIDER * is only used to get the library context */
const char *evp_first_name(OSSL_PROVIDER *prov, int name_id);
int evp_is_a(OSSL_PROVIDER *prov, int number, const char *name);
+void evp_doall_names(OSSL_PROVIDER *prov, int number,
+ void (*fn)(const char *name, void *data),
+ void *data);