diff options
author | Pauli <pauli@openssl.org> | 2021-04-07 11:32:59 +1000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-04-08 17:46:35 +1000 |
commit | 4b1f34f11ff94bc2d0169d6669bfc47f99bd93b3 (patch) | |
tree | 9fd4f62d675b6cf0d179ceb5256f367ab056f466 /include/internal/core.h | |
parent | a135dea4e024ea6750be25859c1d613789a4d575 (diff) |
property: lock the lib ctx when updating the property definition cache
Although the store being used is adequately and properly locked, the library
context is not. Due to the mechanisms used for fetching, it is possible for
multiple stores to live within the same library context for short periods.
This fix prevents threading issues resulting from such coincidences.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14773)
Diffstat (limited to 'include/internal/core.h')
-rw-r--r-- | include/internal/core.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/internal/core.h b/include/internal/core.h index c3c2b74a63..6e66bbeb9a 100644 --- a/include/internal/core.h +++ b/include/internal/core.h @@ -60,4 +60,8 @@ void ossl_algorithm_do_all(OSSL_LIB_CTX *libctx, int operation_id, int no_store, void *data, int *result), void *data); +__owur int ossl_lib_ctx_write_lock(OSSL_LIB_CTX *ctx); +__owur int ossl_lib_ctx_read_lock(OSSL_LIB_CTX *ctx); +int ossl_lib_ctx_unlock(OSSL_LIB_CTX *ctx); + #endif |