mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-22 05:46:41 +01:00
Fix premature fopen() call in mbedtls_entropy_write_seed_file #3175
Signed-off-by: Victor Krasnoshchok <ct3da21164@protonmail.ch>
This commit is contained in:
parent
d69edda8de
commit
12b89cbc0b
4 changed files with 36 additions and 5 deletions
|
|
@ -140,6 +140,21 @@ exit:
|
|||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_ENTROPY_NV_SEED:MBEDTLS_FS_IO */
|
||||
void entropy_write_base_seed_file( int ret )
|
||||
{
|
||||
mbedtls_entropy_context ctx;
|
||||
|
||||
mbedtls_entropy_init( &ctx );
|
||||
|
||||
TEST_ASSERT( mbedtls_entropy_write_seed_file( &ctx, MBEDTLS_PLATFORM_STD_NV_SEED_FILE ) == ret );
|
||||
TEST_ASSERT( mbedtls_entropy_update_seed_file( &ctx, MBEDTLS_PLATFORM_STD_NV_SEED_FILE ) == ret );
|
||||
|
||||
exit:
|
||||
mbedtls_entropy_free( &ctx );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void entropy_too_many_sources( )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue