diff options
author | Pauli <paul.dale@oracle.com> | 2019-07-31 11:31:45 +0200 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-08-01 07:41:30 +0200 |
commit | e2e5abe47af60260e9a4247597e64a4e9d266a7a (patch) | |
tree | 5f8c07b4118f48fcd7d7674228cbdb129f80f419 /crypto/property/property.c | |
parent | The query cache has been updated to not depend on RAND_bytes being available. (diff) | |
download | openssl-e2e5abe47af60260e9a4247597e64a4e9d266a7a.tar.xz openssl-e2e5abe47af60260e9a4247597e64a4e9d266a7a.zip |
Prevent an infinite recursion when the query cache is flushed.
The problem being that the "requires flush" flag was being cleared after the
the flush. The fix is to clear it before. This is a problem because the
cache flushing called RAND_bytes and if the DRBG hadn't been created yet, it
would be queried and added to the cache causing the flush code to repeat.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/9477)
Diffstat (limited to 'crypto/property/property.c')
-rw-r--r-- | crypto/property/property.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/property/property.c b/crypto/property/property.c index a92968c902..cab2ab243e 100644 --- a/crypto/property/property.c +++ b/crypto/property/property.c @@ -429,8 +429,8 @@ static void ossl_method_cache_flush_some(OSSL_METHOD_STORE *store) state.nelem = 0; if ((state.seed = OPENSSL_rdtsc()) == 0) state.seed = 1; - ossl_sa_ALGORITHM_doall_arg(store->algs, &impl_cache_flush_one_alg, &state); store->need_flush = 0; + ossl_sa_ALGORITHM_doall_arg(store->algs, &impl_cache_flush_one_alg, &state); store->nelem = state.nelem; } |