mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-25 04:47:00 +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)
|
||||
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 */
|
||||
|
||||
|
|
Loading…
Reference in a new issue