Extra check in verify_with_profile()

This could happen if someone doesn't set the SSL configuration properly. In
that case we don't want to segfault...
This commit is contained in:
Manuel Pégourié-Gonnard 2015-06-17 11:53:48 +02:00
parent 27716cc1da
commit a83e4e2bf5

View file

@ -2160,6 +2160,9 @@ int mbedtls_x509_crt_verify_with_profile( mbedtls_x509_crt *crt,
mbedtls_x509_name *name;
mbedtls_x509_sequence *cur = NULL;
if( profile == NULL )
return( MBEDTLS_ERR_X509_BAD_INPUT_DATA );
*flags = 0;
if( cn != NULL )