]> git.ipfire.org Git - thirdparty/openssl.git/commit - include/internal/core.h
Refactor method construction pre- and post-condition
authorRichard Levitte <levitte@openssl.org>
Wed, 20 Apr 2022 16:34:09 +0000 (18:34 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 5 May 2022 13:05:54 +0000 (15:05 +0200)
commit10937d5867039afbf869c8514245ed7599b61307
tree127a19971fd40001f570f165e7c53e241af3c8ad
parent20b6d85ab2b9cfa4cd29d2422d69c3e3f4db0a41
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)
crypto/core_algorithm.c
crypto/core_fetch.c
include/internal/core.h