Additional corner cases for testing pathlen constrains. Just in case.
diff --git a/tests/suites/test_suite_x509parse.function b/tests/suites/test_suite_x509parse.function index 99d716b..5be8d48 100644 --- a/tests/suites/test_suite_x509parse.function +++ b/tests/suites/test_suite_x509parse.function
@@ -428,13 +428,15 @@ /* END_CASE */ /* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C */ -void mbedtls_x509_crt_verify_chain( char *chain_paths, char *trusted_ca, int ret ) +void mbedtls_x509_crt_verify_chain( char *chain_paths, char *trusted_ca, int flags_result ) { char* act; uint32_t flags; - int res; + int result, res; mbedtls_x509_crt trusted, chain; + result= flags_result?MBEDTLS_ERR_X509_CERT_VERIFY_FAILED:0; + mbedtls_x509_crt_init( &chain ); mbedtls_x509_crt_init( &trusted ); @@ -443,8 +445,9 @@ TEST_ASSERT( mbedtls_x509_crt_parse_file( &trusted, trusted_ca ) == 0 ); res = mbedtls_x509_crt_verify( &chain, &trusted, NULL, NULL, &flags, NULL, NULL ); - - TEST_ASSERT( ret == res ); + + TEST_ASSERT( res == ( result ) ); + TEST_ASSERT( flags == (uint32_t)( flags_result ) ); exit: mbedtls_x509_crt_free( &trusted );