diff options
author | Richard Levitte <levitte@openssl.org> | 2019-05-23 03:27:37 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-11-20 14:22:35 +0100 |
commit | 6a835fcfb10ba004498f9e39873db3d2b9011609 (patch) | |
tree | 5188724c2854ee6bb4997ef21a4810f6393fdd9f /doc | |
parent | 9ce91035bcf7d74fe15c94650f3bc1f89b7c0f07 (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 'doc')
-rw-r--r-- | doc/internal/man3/ossl_namemap_new.pod | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/internal/man3/ossl_namemap_new.pod b/doc/internal/man3/ossl_namemap_new.pod index 2bcf21386d..b66fd91957 100644 --- a/doc/internal/man3/ossl_namemap_new.pod +++ b/doc/internal/man3/ossl_namemap_new.pod @@ -2,7 +2,7 @@ =head1 NAME -ossl_namemap_new, ossl_namemap_free, ossl_namemap_stored, +ossl_namemap_new, ossl_namemap_free, ossl_namemap_stored, ossl_namemap_empty, ossl_namemap_add, ossl_namemap_add_n, ossl_namemap_name2num, ossl_namemap_name2num_n, ossl_namemap_doall_names @@ -16,6 +16,7 @@ ossl_namemap_doall_names 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, @@ -40,6 +41,9 @@ new B<OSSL_NAMEMAP>. This is suitable to use when the B<OSSL_NAMEMAP> is embedded in other structures, or should be independent for any reason. +ossl_namemap_empty() checks if the given B<OSSL_NAMEMAP> is empty or +not. + ossl_namemap_stored() finds or auto-creates the default namemap in the given library context. The returned B<OSSL_NAMEMAP> can't be destructed using @@ -72,6 +76,9 @@ pass extra data for that function to use. ossl_namemap_new() and ossl_namemap_stored() return the pointer to a B<OSSL_NAMEMAP>, or NULL on error. +ossl_namemap_empty() returns 1 if the B<OSSL_NAMEMAP> is NULL or +empty, or 0 if it's not empty. + ossl_namemap_add() and ossl_namemap_add_n() return the number associated with the added string, or zero on error. |