From: Pauli Date: Sat, 27 Feb 2021 02:18:15 +0000 (+1000) Subject: test: use the new set public and private together call X-Git-Tag: openssl-3.0.0-alpha13~89 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e1f946630f06c2d3a112022472bb13a1586f599f;p=thirdparty%2Fopenssl.git test: use the new set public and private together call Reviewed-by: Tomas Mraz Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/14341) --- diff --git a/test/sm2_internal_test.c b/test/sm2_internal_test.c index d9010168b97..6b80611dd28 100644 --- a/test/sm2_internal_test.c +++ b/test/sm2_internal_test.c @@ -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;