mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Revert "Move random function check"
This reverts commit cc88b34f79
.
It causes many test fail. It should be re-considered.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
@ -3182,12 +3182,6 @@ static int ssl_conf_check(const mbedtls_ssl_context *ssl)
|
|||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
return( ret );
|
return( ret );
|
||||||
|
|
||||||
if( ssl->conf->f_rng == NULL )
|
|
||||||
{
|
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "no RNG provided" ) );
|
|
||||||
return( MBEDTLS_ERR_SSL_NO_RNG );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Space for further checks */
|
/* Space for further checks */
|
||||||
|
|
||||||
return( 0 );
|
return( 0 );
|
||||||
|
@ -116,6 +116,12 @@ static int ssl_tls13_prepare_client_hello( mbedtls_ssl_context *ssl )
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if( ssl->conf->f_rng == NULL )
|
||||||
|
{
|
||||||
|
MBEDTLS_SSL_DEBUG_MSG( 1, ( "no RNG provided" ) );
|
||||||
|
return( MBEDTLS_ERR_SSL_NO_RNG );
|
||||||
|
}
|
||||||
|
|
||||||
if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng,
|
if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng,
|
||||||
ssl->handshake->randbytes,
|
ssl->handshake->randbytes,
|
||||||
CLIENT_HELLO_RAND_BYTES_LEN ) ) != 0 )
|
CLIENT_HELLO_RAND_BYTES_LEN ) ) != 0 )
|
||||||
|
Reference in New Issue
Block a user