mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 13:15:30 +00:00
- Added better handling of missing session struct
This commit is contained in:
parent
00c1c428fc
commit
1c70d409ad
|
@ -415,6 +415,12 @@ static int ssl_write_server_hello( ssl_context *ssl )
|
||||||
ssl->resume = 0;
|
ssl->resume = 0;
|
||||||
ssl->state++;
|
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 )
|
if( ( ret = ssl->f_rng( ssl->p_rng, ssl->session->id, n ) ) != 0 )
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue