summaryrefslogtreecommitdiffstats
path: root/include/internal
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2022-04-20 18:34:09 +0200
committerRichard Levitte <levitte@openssl.org>2022-05-05 15:14:37 +0200
commit27c4ac706a059aab81f3d1d8cc0ba0b3693bf155 (patch)
tree31175a2df60535a0bdd854f8c20a464791afc9eb /include/internal
parent749691374ccf87418ca0e6664a9b9c831dcfe108 (diff)
Refactor method construction pre- and post-condition
The existing pre- and post-condition functions are supposed to check if methods have already been created and stored, using provider operation bits. This is supposed to only be done for "permanent" method stores. However, the way the pre-condition was called, it could not know if the set of implementations to be stored is likely to end up in a "permanent" or a temporary store. It needs access to the |no_store| flag returned by the provider's operation query function, because that call was done after the pre-condition was called. This requires a bit of refactoring, primarly of |algorithm_do_this()|, but also of |ossl_method_construct_precondition()|. Fixes #18150 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18151) (cherry picked from commit 10937d5867039afbf869c8514245ed7599b61307)
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/internal/core.h b/include/internal/core.h
index 274e368aaa..545d985385 100644
--- a/include/internal/core.h
+++ b/include/internal/core.h
@@ -49,7 +49,7 @@ void *ossl_method_construct(OSSL_LIB_CTX *ctx, int operation_id,
void ossl_algorithm_do_all(OSSL_LIB_CTX *libctx, int operation_id,
OSSL_PROVIDER *provider,
int (*pre)(OSSL_PROVIDER *, int operation_id,
- void *data, int *result),
+ int no_store, void *data, int *result),
void (*fn)(OSSL_PROVIDER *provider,
const OSSL_ALGORITHM *algo,
int no_store, void *data),