[openssl] master update
tomas at openssl.org
tomas at openssl.org
Thu Feb 25 13:02:10 UTC 2021
The branch master has been updated
via 8cdc3425aff7447af868de8590053191b32ad454 (commit)
via 0c84139c98bf81de2ec8e5aba8aef428ce6e1079 (commit)
from 75de54363506e2b2480fc6baf0cd45b1f7fc8816 (commit)
- Log -----------------------------------------------------------------
commit 8cdc3425aff7447af868de8590053191b32ad454
Author: Tomas Mraz <tomas at openssl.org>
Date: Wed Feb 24 16:44:41 2021 +0100
fake_random: Do not overwrite the callback on instatiation
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14299)
commit 0c84139c98bf81de2ec8e5aba8aef428ce6e1079
Author: Tomas Mraz <tomas at openssl.org>
Date: Wed Feb 24 12:32:40 2021 +0100
Ensure that the fake rand is initialized
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14299)
-----------------------------------------------------------------------
Summary of changes:
test/testutil/fake_random.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/test/testutil/fake_random.c b/test/testutil/fake_random.c
index 95a3023cd4..7e18e72d45 100644
--- a/test/testutil/fake_random.c
+++ b/test/testutil/fake_random.c
@@ -33,7 +33,6 @@ static OSSL_FUNC_rand_enable_locking_fn fake_rand_enable_locking;
static void *fake_rand_newctx(void *provctx, void *parent,
const OSSL_DISPATCH *parent_dispatch)
{
- fake_rand.cb = NULL;
fake_rand.state = EVP_RAND_STATE_UNINITIALISED;
return &fake_rand;
}
@@ -177,6 +176,14 @@ OSSL_PROVIDER *fake_rand_start(OSSL_LIB_CTX *libctx)
|| !TEST_true(RAND_set_DRBG_type(libctx, "fake", NULL, NULL, NULL))
|| !TEST_ptr(p = OSSL_PROVIDER_try_load(libctx, "fake-rand", 1)))
return NULL;
+
+ /* Ensure that the fake rand is initialized. */
+ if (!TEST_ptr(RAND_get0_private(libctx))
+ || !TEST_ptr(RAND_get0_public(libctx))) {
+ OSSL_PROVIDER_unload(p);
+ return NULL;
+ }
+
return p;
}
More information about the openssl-commits
mailing list