CORE: Move away the allocation of the temporary no_cache method store
authorRichard Levitte <levitte@openssl.org>
Mon, 14 Jun 2021 07:25:53 +0000 (09:25 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 15 Jun 2021 13:06:04 +0000 (15:06 +0200)
commit9067cf6ccdce0a73922f06937e54c2fce2752038
tree88e4aff0bd89144982e4fa231558a20c40dad388
parent515480be79de6907fcf0f7797aa0d3cd45e7d33c
CORE: Move away the allocation of the temporary no_cache method store

The responsibility for managing the temporary store for methods from
algorithm implementations flaged "no_store" is moved up to the diverse
method fetching functions.  This allows them to allocate it "just in
time", or in other words not at all if there is not such algorithm
implementation.

This makes this temporary store more flexible if it's needed outside
of the core fetching functionality, and slightly faster when this
temporary store isn't necessary at all.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15737)
crypto/core_fetch.c
crypto/encode_decode/decoder_meth.c
crypto/encode_decode/encoder_meth.c
crypto/evp/evp_fetch.c
crypto/store/store_meth.c
include/internal/core.h