Skip to content

Commit

Permalink
test: use the new set public and private together call
Browse files Browse the repository at this point in the history
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from #14341)
  • Loading branch information
paulidale committed Mar 2, 2021
1 parent 740582c commit e1f9466
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/sm2_internal_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e1f9466

Please sign in to comment.