Lines Matching full:primary
140 EVP_RAND_CTX *primary = RAND_get0_primary(NULL); in using_fips_rng() local
144 if (!TEST_ptr(primary)) in using_fips_rng()
147 prov = EVP_RAND_get0_provider(EVP_RAND_CTX_get0_rand(primary)); in using_fips_rng()
171 * |primary|, |public|, |private|: pointers to the three shared DRBGs
181 EVP_RAND_CTX *primary, in test_drbg_reseed() argument
208 if (!TEST_int_ne(primary_reseed = reseed_counter(primary), 0) in test_drbg_reseed()
235 if (!TEST_int_eq(state(primary), expected_state) in test_drbg_reseed()
241 /* Test whether primary DRBG was reseeded as expected */ in test_drbg_reseed()
242 if (!TEST_int_ge(reseed_counter(primary), primary_reseed)) in test_drbg_reseed()
250 reseed_counter(primary))) in test_drbg_reseed()
258 reseed_counter(primary))) in test_drbg_reseed()
263 /* Test whether reseed time of primary DRBG is set correctly */ in test_drbg_reseed()
264 if (!TEST_time_t_le(before_reseed, reseed_time(primary)) in test_drbg_reseed()
265 || !TEST_time_t_le(reseed_time(primary), after_reseed)) in test_drbg_reseed()
268 /* Test whether reseed times of child DRBGs are synchronized with primary */ in test_drbg_reseed()
269 if (!TEST_time_t_ge(reseed_time(public), reseed_time(primary)) in test_drbg_reseed()
270 || !TEST_time_t_ge(reseed_time(private), reseed_time(primary))) in test_drbg_reseed()
331 * Test whether primary, public and private DRBG are reseeded
336 static int test_drbg_reseed_in_child(EVP_RAND_CTX *primary, in test_drbg_reseed_in_child() argument
388 if (TEST_true(test_drbg_reseed(1, primary, public, private, in test_drbg_reseed_in_child()
405 static int test_rand_reseed_on_fork(EVP_RAND_CTX *primary, in test_rand_reseed_on_fork() argument
430 if (!TEST_true(test_drbg_reseed_in_child(primary, in test_rand_reseed_on_fork()
441 primary, public, private, in test_rand_reseed_on_fork()
529 EVP_RAND_CTX *primary, *public, *private; in test_rand_fork_safety() local
532 if (!TEST_ptr(primary = RAND_get0_primary(NULL)) in test_rand_fork_safety()
538 if (!TEST_true(test_rand_reseed_on_fork(primary, public, private))) in test_rand_fork_safety()
556 EVP_RAND_CTX *primary, *public, *private; in test_rand_reseed() local
571 if (!TEST_ptr(primary = RAND_get0_primary(NULL)) in test_rand_reseed()
576 /* There should be three distinct DRBGs, two of them chained to primary */ in test_rand_reseed()
578 || !TEST_ptr_ne(public, primary) in test_rand_reseed()
579 || !TEST_ptr_ne(private, primary) in test_rand_reseed()
580 || !TEST_ptr_eq(prov_rand(public)->parent, prov_rand(primary)) in test_rand_reseed()
581 || !TEST_ptr_eq(prov_rand(private)->parent, prov_rand(primary))) in test_rand_reseed()
584 /* Disable CRNG testing for the primary DRBG */ in test_rand_reseed()
585 if (!TEST_true(disable_crngt(primary))) in test_rand_reseed()
589 EVP_RAND_uninstantiate(primary); in test_rand_reseed()
597 primary, public, private, in test_rand_reseed()
606 primary, public, private, in test_rand_reseed()
613 * reseed counters differ from the primary's reseed counter. in test_rand_reseed()
615 inc_reseed_counter(primary); in test_rand_reseed()
617 primary, public, private, in test_rand_reseed()
624 * from the primary's reseed counter. in test_rand_reseed()
626 inc_reseed_counter(primary); in test_rand_reseed()
629 primary, public, private, in test_rand_reseed()
636 * from the primary's reseed counter. in test_rand_reseed()
638 inc_reseed_counter(primary); in test_rand_reseed()
641 primary, public, private, in test_rand_reseed()
652 * test_drbg_reseed() test, because the primary DRBG gets already reseeded in test_rand_reseed()
654 * before_reseed <= reseed_time(primary) will fail if the time value happens in test_rand_reseed()
660 primary, public, private, in test_rand_reseed()
843 * propagated to the primary, so that the entire DRBG chain reseeds. in test_rand_prediction_resistance()
866 * should be propagated to the primary, reseeding the entire DRBG chain. in test_rand_prediction_resistance()