commit | a9a028ebd0fb74d2fd893089966575bdcd52a018 | [log] [tgz] |
---|---|---|
author | Paul Bakker <p.j.bakker@polarssl.org> | Thu Nov 21 17:31:06 2013 +0100 |
committer | Paul Bakker <p.j.bakker@polarssl.org> | Thu Nov 21 17:31:06 2013 +0100 |
tree | 784b1b19a38f0f211245d5957eea9d5f9ccf7922 | |
parent | f2b4d86452c29e327a2c9cfa041b84c65e3d7a3b [diff] [blame] |
SSL now gracefully handles missing RNG
diff --git a/library/ssl_cli.c b/library/ssl_cli.c index 0eaa531..3cde375 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c
@@ -390,6 +390,12 @@ 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;