- Added internal ctr_drbg_init_entropy_len() to allow NIST determined entropy tests to work
diff --git a/tests/suites/test_suite_ctr_drbg.function b/tests/suites/test_suite_ctr_drbg.function
index e817658..7349517 100644
--- a/tests/suites/test_suite_ctr_drbg.function
+++ b/tests/suites/test_suite_ctr_drbg.function
@@ -8,6 +8,14 @@
test_offset += 32;
return( 0 );
}
+
+int ctr_drbg_init_entropy_len(
+ ctr_drbg_context *ctx,
+ int (*f_entropy)(void *, unsigned char *, size_t),
+ void *p_entropy,
+ const unsigned char *custom,
+ size_t len,
+ size_t entropy_len );
END_HEADER
BEGIN_DEPENDENCIES
@@ -34,7 +42,7 @@
add2_len = unhexify( add2, {add2_string} );
test_offset = 0;
- TEST_ASSERT( ctr_drbg_init( &ctx, entropy_func, entropy, add_init, add_init_len ) == 0 );
+ TEST_ASSERT( ctr_drbg_init_entropy_len( &ctx, entropy_func, entropy, add_init, add_init_len, 32 ) == 0 );
ctr_drbg_set_prediction_resistance( &ctx, CTR_DRBG_PR_ON );
TEST_ASSERT( ctr_drbg_random_with_add( &ctx, buf, 16, add1, add1_len ) == 0 );
@@ -66,7 +74,7 @@
add2_len = unhexify( add2, {add2_string} );
test_offset = 0;
- TEST_ASSERT( ctr_drbg_init( &ctx, entropy_func, entropy, add_init, add_init_len ) == 0 );
+ TEST_ASSERT( ctr_drbg_init_entropy_len( &ctx, entropy_func, entropy, add_init, add_init_len, 32 ) == 0 );
TEST_ASSERT( ctr_drbg_random_with_add( &ctx, buf, 16, add1, add1_len ) == 0 );
TEST_ASSERT( ctr_drbg_reseed( &ctx, add_reseed, add_reseed_len ) == 0 );