mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
SSL now gracefully handles missing RNG
This commit is contained in:
@ -390,6 +390,12 @@ static int ssl_write_client_hello( ssl_context *ssl )
|
||||
|
||||
SSL_DEBUG_MSG( 2, ( "=> write client hello" ) );
|
||||
|
||||
if( ssl->f_rng == NULL )
|
||||
{
|
||||
SSL_DEBUG_MSG( 1, ( "no RNG provided") );
|
||||
return( POLARSSL_ERR_SSL_NO_RNG );
|
||||
}
|
||||
|
||||
if( ssl->renegotiation == SSL_INITIAL_HANDSHAKE )
|
||||
{
|
||||
ssl->major_ver = ssl->min_major_ver;
|
||||
|
Reference in New Issue
Block a user