Manuel Pégourié-Gonnard | 2c25eb0 | 2014-05-30 10:38:18 +0200 | [diff] [blame^] | 1 | /* BEGIN_HEADER */ |
| 2 | #include <polarssl/entropy.h> |
| 3 | /* END_HEADER */ |
| 4 | |
| 5 | /* BEGIN_DEPENDENCIES |
| 6 | * depends_on:POLARSSL_ENTROPY_C |
| 7 | * END_DEPENDENCIES |
| 8 | */ |
| 9 | |
| 10 | /* BEGIN_CASE depends_on:POLARSSL_FS_IO */ |
| 11 | void entropy_seed_file( char *path, int ret ) |
| 12 | { |
| 13 | entropy_context ctx; |
| 14 | |
| 15 | entropy_init( &ctx ); |
| 16 | |
| 17 | TEST_ASSERT( entropy_write_seed_file( &ctx, path ) == ret ); |
| 18 | TEST_ASSERT( entropy_update_seed_file( &ctx, path ) == ret ); |
| 19 | |
| 20 | entropy_free( &ctx ); |
| 21 | } |
| 22 | /* END_CASE */ |
| 23 | |
| 24 | /* BEGIN_CASE depends_on:POLARSSL_SELF_TEST */ |
| 25 | void entropy_selftest( ) |
| 26 | { |
| 27 | TEST_ASSERT( entropy_self_test( 0 ) == 0 ); |
| 28 | } |
| 29 | /* END_CASE */ |