SSL now gracefully handles missing RNG
diff --git a/library/ssl_cli.c b/library/ssl_cli.c
index fc82002..2a15da1 100644
--- a/library/ssl_cli.c
+++ b/library/ssl_cli.c
@@ -50,6 +50,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;