Split mbedtls_ctr_drbg_init() -> seed()

This commit is contained in:
Manuel Pégourié-Gonnard 2015-04-28 22:38:08 +02:00
parent f9e9481bc5
commit 8d128efd48
7 changed files with 48 additions and 18 deletions

View file

@ -666,8 +666,10 @@ void mbedtls_rsa_gen_key( int nrbits, int exponent, int result)
mbedtls_ctr_drbg_context ctr_drbg;
const char *pers = "test_suite_rsa";
mbedtls_ctr_drbg_init( &ctr_drbg );
mbedtls_entropy_init( &entropy );
TEST_ASSERT( mbedtls_ctr_drbg_init( &ctr_drbg, mbedtls_entropy_func, &entropy,
TEST_ASSERT( mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy,
(const unsigned char *) pers, strlen( pers ) ) == 0 );
mbedtls_rsa_init( &ctx, 0, 0 );