The branch master has been updated
via 2f881d2d9065342454fe352eac9e835cefa0ba90 (commit)
from a273157a3e10930b52b30e0ee39552eaf2a56e17 (commit)
- Log -----------------------------------------------------------------
commit 2f881d2d9065342454fe352eac9e835cefa0ba90
Author: Richard Levitte <[email protected]>
Date: Fri Apr 7 16:26:10 2017 +0200
Fix rand_lib.c for no-engine configuration
When configured no-engine, we still refered to rand_engine_lock.
Rework the lock init code to avoid that.
Reviewed-by: Matt Caswell <[email protected]>
(Merged from https://github.com/openssl/openssl/pull/3145)
-----------------------------------------------------------------------
Summary of changes:
crypto/rand/rand_lib.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c
index dc62902..40e2464 100644
--- a/crypto/rand/rand_lib.c
+++ b/crypto/rand/rand_lib.c
@@ -26,11 +26,14 @@ static CRYPTO_ONCE rand_lock_init = CRYPTO_ONCE_STATIC_INIT;
DEFINE_RUN_ONCE_STATIC(do_rand_lock_init)
{
+ int ret = 1;
#ifndef OPENSSL_NO_ENGINE
rand_engine_lock = CRYPTO_THREAD_lock_new();
+ ret &= rand_engine_lock != NULL;
#endif
rand_meth_lock = CRYPTO_THREAD_lock_new();
- return rand_engine_lock != NULL && rand_meth_lock != NULL;
+ ret &= rand_meth_lock != NULL;
+ return ret;
}
int RAND_set_rand_method(const RAND_METHOD *meth)
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits