From 534f82c77a7a07e0c3404a9973c705c5dcdd0131 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Tue, 25 Jun 2013 16:47:55 +0200 Subject: [PATCH] Made ctr_drbg_init_entropy_len() non-static and defined --- include/polarssl/ctr_drbg.h | 3 +++ library/ctr_drbg.c | 2 +- tests/suites/test_suite_ctr_drbg.function | 8 -------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/include/polarssl/ctr_drbg.h b/include/polarssl/ctr_drbg.h index 5a26cdee10..b47d3890a4 100644 --- a/include/polarssl/ctr_drbg.h +++ b/include/polarssl/ctr_drbg.h @@ -224,6 +224,9 @@ int ctr_drbg_update_seed_file( ctr_drbg_context *ctx, const char *path ); */ int ctr_drbg_self_test( int verbose ); +/* Internal functions (do not call directly) */ +int ctr_drbg_init_entropy_len( ctr_drbg_context *, int (*)(void *, unsigned char *, size_t), void *, const unsigned char *, size_t, size_t ); + #ifdef __cplusplus } #endif diff --git a/library/ctr_drbg.c b/library/ctr_drbg.c index 3182c3b8d3..970de52260 100644 --- a/library/ctr_drbg.c +++ b/library/ctr_drbg.c @@ -42,7 +42,7 @@ * Non-public function wrapped by ctr_crbg_init(). Necessary to allow NIST * tests to succeed (which require known length fixed entropy) */ -static int ctr_drbg_init_entropy_len( +int ctr_drbg_init_entropy_len( ctr_drbg_context *ctx, int (*f_entropy)(void *, unsigned char *, size_t), void *p_entropy, diff --git a/tests/suites/test_suite_ctr_drbg.function b/tests/suites/test_suite_ctr_drbg.function index 155bfc5209..110eb8cef0 100644 --- a/tests/suites/test_suite_ctr_drbg.function +++ b/tests/suites/test_suite_ctr_drbg.function @@ -9,14 +9,6 @@ int entropy_func( void *data, unsigned char *buf, size_t len ) 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