Add further debug statements on assertion failures

This commit is contained in:
Hanno Becker 2019-02-26 12:36:01 +00:00
parent 353a6f0d50
commit bd5580abb1

View File

@ -2419,6 +2419,7 @@ static int ssl_get_ecdh_params_from_cert( mbedtls_ssl_context *ssl )
if( ssl->session_negotiate->peer_cert == NULL ) if( ssl->session_negotiate->peer_cert == NULL )
{ {
/* Should never happen */ /* Should never happen */
MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
} }
peer_pk = &ssl->session_negotiate->peer_cert->pk; peer_pk = &ssl->session_negotiate->peer_cert->pk;
@ -2772,6 +2773,7 @@ start_processing:
if( ssl->session_negotiate->peer_cert == NULL ) if( ssl->session_negotiate->peer_cert == NULL )
{ {
/* Should never happen */ /* Should never happen */
MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
} }
peer_pk = &ssl->session_negotiate->peer_cert->pk; peer_pk = &ssl->session_negotiate->peer_cert->pk;