]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
test: use the new set public and private together call
authorPauli <ppzgs1@gmail.com>
Sat, 27 Feb 2021 02:18:15 +0000 (12:18 +1000)
committerPauli <ppzgs1@gmail.com>
Tue, 2 Mar 2021 03:23:17 +0000 (13:23 +1000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14341)

test/sm2_internal_test.c

index d9010168b971afadaa2fcdac92c4edecfff2bc0a..6b80611dd287fa6305d9e5a5f6c29e67b81df7fb 100644 (file)
@@ -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;