diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 6630ad874..dde0155cb 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -3482,6 +3482,9 @@ int ssl_get_ciphersuite_id( const char *ciphersuite_name ) 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 ); }