mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
Merge pull request #2894 from gilles-peskine-arm/drbg-set_entropy_len-2.16
Backport 2.16: Allow xxx_drbg_set_entropy_len before xxx_drbg_seed
This commit is contained in:
commit
c0546439c4
7 changed files with 108 additions and 105 deletions
|
|
@ -44,11 +44,11 @@ static void ctr_drbg_validate_internal( int reseed_mode, data_t * nonce,
|
|||
|
||||
/* CTR_DRBG_Instantiate(entropy[:entropy->len], nonce, perso, <ignored>)
|
||||
* where nonce||perso = nonce[nonce->len] */
|
||||
TEST_ASSERT( mbedtls_ctr_drbg_seed_entropy_len(
|
||||
mbedtls_ctr_drbg_set_entropy_len( &ctx, entropy_chunk_len );
|
||||
TEST_ASSERT( mbedtls_ctr_drbg_seed(
|
||||
&ctx,
|
||||
mbedtls_test_entropy_func, entropy->x,
|
||||
nonce->x, nonce->len,
|
||||
entropy_chunk_len ) == 0 );
|
||||
nonce->x, nonce->len ) == 0 );
|
||||
if( reseed_mode == RESEED_ALWAYS )
|
||||
mbedtls_ctr_drbg_set_prediction_resistance(
|
||||
&ctx,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue