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