Fixed possible NULL pointer exception in ssl_get_ciphersuite()

This commit is contained in:
Paul Bakker 2013-03-06 10:23:34 +01:00
parent 8804f69d46
commit 926c8e49fe

View file

@ -3482,6 +3482,9 @@ int ssl_get_ciphersuite_id( const char *ciphersuite_name )
const char *ssl_get_ciphersuite( const ssl_context *ssl ) const char *ssl_get_ciphersuite( const ssl_context *ssl )
{ {
if( ssl == NULL || ssl->session == NULL )
return NULL;
return ssl_get_ciphersuite_name( ssl->session->ciphersuite ); return ssl_get_ciphersuite_name( ssl->session->ciphersuite );
} }