Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openssl/openssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-05-23 04:27:37 +0300
committerRichard Levitte <levitte@openssl.org>2019-11-20 16:22:35 +0300
commit6a835fcfb10ba004498f9e39873db3d2b9011609 (patch)
tree5188724c2854ee6bb4997ef21a4810f6393fdd9f /include/internal
parent9ce91035bcf7d74fe15c94650f3bc1f89b7c0f07 (diff)
Replumbing: pre-populate the EVP namemap with commonly known names
This adds ossl_namemap_empty(), to detect if a namemap is empty and can thereby be pre-populated. This also affects the way legacy NIDs are looked up in evp_cipher_from_dispatch() and evp_md_from_dispatch(). Instead of trying to find the NID directly, look up the legacy method structure and grab the NID from there. The reason is that NIDs can be aliases for other NIDs, which looks like a clash even if wasn't really one. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8984)
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/namemap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/internal/namemap.h b/include/internal/namemap.h
index 73163a42cb..f977606ca6 100644
--- a/include/internal/namemap.h
+++ b/include/internal/namemap.h
@@ -15,6 +15,7 @@ OSSL_NAMEMAP *ossl_namemap_stored(OPENSSL_CTX *libctx);
OSSL_NAMEMAP *ossl_namemap_new(void);
void ossl_namemap_free(OSSL_NAMEMAP *namemap);
+int ossl_namemap_empty(OSSL_NAMEMAP *namemap);
int ossl_namemap_add(OSSL_NAMEMAP *namemap, int number, const char *name);
int ossl_namemap_add_n(OSSL_NAMEMAP *namemap, int number,