summaryrefslogtreecommitdiffstats
path: root/include/internal/core.h
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:05:54 +0200
commit10937d5867039afbf869c8514245ed7599b61307 (patch)
tree127a19971fd40001f570f165e7c53e241af3c8ad /include/internal/core.h
parentDrop ossl_provider_clear_all_operation_bits() and all uses of it (diff)
downloadopenssl-10937d5867039afbf869c8514245ed7599b61307.tar.xz
openssl-10937d5867039afbf869c8514245ed7599b61307.zip
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)
Diffstat (limited to 'include/internal/core.h')
-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),