mirror of
https://github.com/openssl/openssl.git
synced 2025-03-31 20:10:45 +08:00
test: use the new set public and private together call
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/14341)
This commit is contained in:
parent
740582cfaf
commit
e1f946630f
@ -60,16 +60,14 @@ static int start_fake_rand(const char *hex_bytes)
|
||||
return 0;
|
||||
|
||||
/* use own random function */
|
||||
fake_rand_set_callback(RAND_get0_private(NULL), get_faked_bytes);
|
||||
fake_rand_set_callback(RAND_get0_public(NULL), get_faked_bytes);
|
||||
fake_rand_set_public_private_callbacks(NULL, get_faked_bytes);
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
static void restore_rand(void)
|
||||
{
|
||||
fake_rand_set_callback(RAND_get0_private(NULL), NULL);
|
||||
fake_rand_set_callback(RAND_get0_public(NULL), NULL);
|
||||
fake_rand_set_public_private_callbacks(NULL, NULL);
|
||||
OPENSSL_free(fake_rand_bytes);
|
||||
fake_rand_bytes = NULL;
|
||||
fake_rand_bytes_offset = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user