Refactor evp_generic_do_all() to behave like evp_generic_fetch()
authorRichard Levitte <levitte@openssl.org>
Wed, 9 Jun 2021 05:50:08 +0000 (07:50 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 15 Jun 2021 14:21:32 +0000 (16:21 +0200)
commit793b05865a3892258522e875df6ba4dff2ceb817
tree6a6256ad8043e6d3c9ccefec23a5e18ec48bf128
parentb3f5d5d3684c4059b09e73b951a84fc0d77594e9
Refactor evp_generic_do_all() to behave like evp_generic_fetch()

This is refactored to use inner_evp_generic_fetch() without any given
name, which is just there to ensure all decoder implementations are
made into methods, and then use ossl_method_store_do_all() to list
them all.

This also adds the internal evp_generic_do_all_prefetched(), which
can be used if pre-fetching needs to be done separately from listing
all the decoder implementations, or if listing may happen multiple
times.

Fixes #15538
Fixes #14837

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15604)
crypto/evp/evp_fetch.c
crypto/evp/evp_local.h