diff options
author | Richard Levitte <levitte@openssl.org> | 2021-06-14 09:25:53 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-06-15 15:06:04 +0200 |
commit | 9067cf6ccdce0a73922f06937e54c2fce2752038 (patch) | |
tree | 88e4aff0bd89144982e4fa231558a20c40dad388 /include | |
parent | 515480be79de6907fcf0f7797aa0d3cd45e7d33c (diff) |
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)
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/core.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/internal/core.h b/include/internal/core.h index 091b4b2d04..d8395a2c92 100644 --- a/include/internal/core.h +++ b/include/internal/core.h @@ -28,10 +28,8 @@ * says (for example, because the application knows better). */ typedef struct ossl_method_construct_method_st { - /* Create store */ - void *(*alloc_tmp_store)(OSSL_LIB_CTX *ctx); - /* Remove a store */ - void (*dealloc_tmp_store)(void *store); + /* Get a temporary store */ + void *(*get_tmp_store)(void *data); /* Get an already existing method from a store */ void *(*get)(OSSL_LIB_CTX *libctx, void *store, void *data); /* Store a method in a store */ |