Added test case for pathlen constrains in intermediate certificates
diff --git a/tests/suites/test_suite_x509parse.function b/tests/suites/test_suite_x509parse.function
index 95fc287..99d716b 100644
--- a/tests/suites/test_suite_x509parse.function
+++ b/tests/suites/test_suite_x509parse.function
@@ -427,6 +427,31 @@
 }
 /* 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 )
+{
+    char* act;
+    uint32_t flags;
+    int res;
+    mbedtls_x509_crt trusted, chain; 
+
+    mbedtls_x509_crt_init( &chain );
+    mbedtls_x509_crt_init( &trusted );
+
+    while( (act = strsep( &chain_paths, " " )) ) 
+        TEST_ASSERT( mbedtls_x509_crt_parse_file( &chain, act ) == 0 ); 
+    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 );
+
+exit:
+    mbedtls_x509_crt_free( &trusted );
+    mbedtls_x509_crt_free( &chain );
+}
+/* END_CASE */
+
 /* BEGIN_CASE depends_on:MBEDTLS_X509_USE_C */
 void x509_oid_desc( char *oid_str, char *ref_desc )
 {