Refactor OSSL_ENCODER_do_all_provided() to behave like OSSL_ENCODER_fetch()
authorRichard Levitte <levitte@openssl.org>
Wed, 9 Jun 2021 05:47:41 +0000 (07:47 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 15 Jun 2021 14:21:32 +0000 (16:21 +0200)
commitb3f5d5d3684c4059b09e73b951a84fc0d77594e9
tree22cc34e5ed799e044a0de62c2ea87df756690605
parent07562828308417205f39a628af3b78af0d30d308
Refactor OSSL_ENCODER_do_all_provided() to behave like OSSL_ENCODER_fetch()

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

This also adds the internal ossl_encoder_do_all_prefetched(), which
can be used if pre-fetching needs to be done separately from listing
all the encoder 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/encode_decode/encoder_meth.c