mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-07-09 06:10:37 +00:00
tinyCrypt: Adapt RNG wrapper to return 0 on failure
This commit is contained in:
parent
ef982d57bf
commit
d089fad925
|
@ -58,7 +58,12 @@
|
||||||
#if defined(MBEDTLS_USE_TINYCRYPT)
|
#if defined(MBEDTLS_USE_TINYCRYPT)
|
||||||
static int uecc_rng_wrapper( uint8_t *dest, unsigned int size )
|
static int uecc_rng_wrapper( uint8_t *dest, unsigned int size )
|
||||||
{
|
{
|
||||||
return( mbedtls_ssl_conf_rng_func( NULL, dest, size ) );
|
int ret;
|
||||||
|
ret = mbedtls_ssl_conf_rng_func( NULL, dest, size );
|
||||||
|
if( ret == 0 )
|
||||||
|
return( (int) size );
|
||||||
|
|
||||||
|
return( 0 );
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_USE_TINYCRYPT */
|
#endif /* MBEDTLS_USE_TINYCRYPT */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue