Skip to content

Commit 409fdae

Browse files
committed
test_suite_ctr_drbg: use ctr_drbg_update_ret instead of ctr_drbg_update
Align files with development to ensure the same state of repositories.
1 parent f093a3d commit 409fdae

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/suites/test_suite_ctr_drbg.function

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,11 @@ void ctr_drbg_entropy_usage( )
244244
}
245245
TEST_ASSERT( last_idx == test_offset_idx );
246246

247-
/* Call update with too much data (sizeof entropy > MAX(_SEED)_INPUT)
248-
* (just make sure it doesn't cause memory corruption) */
249-
mbedtls_ctr_drbg_update( &ctx, entropy, sizeof( entropy ) );
247+
/* Call update with too much data (sizeof entropy > MAX(_SEED)_INPUT).
248+
* Make sure it's detected as an error and doesn't cause memory
249+
* corruption. */
250+
TEST_ASSERT( mbedtls_ctr_drbg_update_ret(
251+
&ctx, entropy, sizeof( entropy ) ) != 0 );
250252

251253
/* Now enable PR, so the next few calls should all reseed */
252254
mbedtls_ctr_drbg_set_prediction_resistance( &ctx, MBEDTLS_CTR_DRBG_PR_ON );

0 commit comments

Comments
 (0)