mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 19:38:21 +00:00
- Added better handling of missing session struct
This commit is contained in:
parent
00c1c428fc
commit
1c70d409ad
1 changed files with 6 additions and 0 deletions
|
@ -415,6 +415,12 @@ static int ssl_write_server_hello( ssl_context *ssl )
|
|||
ssl->resume = 0;
|
||||
ssl->state++;
|
||||
|
||||
if( ssl->session == NULL )
|
||||
{
|
||||
SSL_DEBUG_MSG( 1, ( "No session struct set" ) );
|
||||
return( POLARSSL_ERR_SSL_BAD_INPUT_DATA );
|
||||
}
|
||||
|
||||
if( ( ret = ssl->f_rng( ssl->p_rng, ssl->session->id, n ) ) != 0 )
|
||||
return( ret );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue