1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Move random function check

move to `ssl_conf_check`

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
Jerry Yu
2021-08-26 16:28:36 +08:00
parent c7ddeec229
commit 708202b7d0
2 changed files with 6 additions and 6 deletions

View File

@ -111,12 +111,6 @@ static int ssl_client_hello_prepare( mbedtls_ssl_context* ssl )
int ret;
size_t rand_bytes_len;
if( ssl->conf->f_rng == NULL )
{
MBEDTLS_SSL_DEBUG_MSG( 1, ( "no RNG provided" ) );
return( MBEDTLS_ERR_SSL_NO_RNG );
}
rand_bytes_len = 32;
if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, ssl->handshake->randbytes, rand_bytes_len ) ) != 0 )