mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-20 22:05:15 +00:00
Merge branch 'development' into Remove__CHECK_PARAMS_option
This commit is contained in:
commit
0730cd5d9e
78 changed files with 6402 additions and 1229 deletions
|
|
@ -35,6 +35,8 @@
|
|||
#include <test/random.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <mbedtls/entropy.h>
|
||||
|
||||
int mbedtls_test_rnd_std_rand( void *rng_state,
|
||||
unsigned char *output,
|
||||
size_t len )
|
||||
|
|
@ -91,8 +93,16 @@ int mbedtls_test_rnd_buffer_rand( void *rng_state,
|
|||
}
|
||||
|
||||
if( len - use_len > 0 )
|
||||
return( mbedtls_test_rnd_std_rand( NULL, output + use_len,
|
||||
len - use_len ) );
|
||||
{
|
||||
if( info->fallback_f_rng != NULL )
|
||||
{
|
||||
return( info->fallback_f_rng( info->fallback_p_rng,
|
||||
output + use_len,
|
||||
len - use_len ) );
|
||||
}
|
||||
else
|
||||
return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue