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:
parent
27716cc1da
commit
a83e4e2bf5
1 changed files with 3 additions and 0 deletions
|
@ -2160,6 +2160,9 @@ int mbedtls_x509_crt_verify_with_profile( mbedtls_x509_crt *crt,
|
||||||
mbedtls_x509_name *name;
|
mbedtls_x509_name *name;
|
||||||
mbedtls_x509_sequence *cur = NULL;
|
mbedtls_x509_sequence *cur = NULL;
|
||||||
|
|
||||||
|
if( profile == NULL )
|
||||||
|
return( MBEDTLS_ERR_X509_BAD_INPUT_DATA );
|
||||||
|
|
||||||
*flags = 0;
|
*flags = 0;
|
||||||
|
|
||||||
if( cn != NULL )
|
if( cn != NULL )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue