diff options
author | Pauli <pauli@openssl.org> | 2021-03-30 10:29:01 +1000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-04-08 17:46:35 +1000 |
commit | 860ecfd70022fa5700c7fb129845129b4c674ecd (patch) | |
tree | 1ade8cb44f104dcd2a7d8b8b03d7bf2b65d9fdea /crypto/evp | |
parent | 9695f6de1579f5d46e75cfebbaf44bc99cb421ec (diff) | |
download | openssl-860ecfd70022fa5700c7fb129845129b4c674ecd.tar.gz |
property: check return values from the property locking calls.
A failure to obtain a lock would have resulted in much badness, now it results
in a failure return.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14773)
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/evp_fetch.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/evp/evp_fetch.c b/crypto/evp/evp_fetch.c index 4b81204046..3893220441 100644 --- a/crypto/evp/evp_fetch.c +++ b/crypto/evp/evp_fetch.c @@ -371,12 +371,13 @@ void *evp_generic_fetch_by_number(OSSL_LIB_CTX *libctx, int operation_id, free_method); } -void evp_method_store_flush(OSSL_LIB_CTX *libctx) +int evp_method_store_flush(OSSL_LIB_CTX *libctx) { OSSL_METHOD_STORE *store = get_evp_method_store(libctx); if (store != NULL) - ossl_method_store_flush_cache(store, 1); + return ossl_method_store_flush_cache(store, 1); + return 1; } static int evp_set_parsed_default_properties(OSSL_LIB_CTX *libctx, @@ -390,7 +391,7 @@ static int evp_set_parsed_default_properties(OSSL_LIB_CTX *libctx, ossl_property_free(*plp); *plp = def_prop; if (store != NULL) - ossl_method_store_flush_cache(store, 0); + return ossl_method_store_flush_cache(store, 0); return 1; } ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR); |