SSL now gracefully handles missing RNG

This commit is contained in:
Paul Bakker 2013-11-21 17:31:06 +01:00
parent f2b4d86452
commit a9a028ebd0
5 changed files with 16 additions and 3 deletions

View file

@ -1594,6 +1594,12 @@ static int ssl_write_server_hello( ssl_context *ssl )
SSL_DEBUG_MSG( 2, ( "=> write server hello" ) );
if( ssl->f_rng == NULL )
{
SSL_DEBUG_MSG( 1, ( "no RNG provided") );
return( POLARSSL_ERR_SSL_NO_RNG );
}
/*
* 0 . 0 handshake type
* 1 . 3 handshake length