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...
parent 27716cc1
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment