Allow loading symlinked certificates

When mbedtls_x509_crt_parse_path() checks each object in the supplied path, it only processes regular files. This change makes it also accept a symlink to a file. Fixes #3005.

This was observed to be a problem on Fedora/CentOS/RHEL systems, where the ca-bundle in the default location is actually a symlink.
This commit is contained in:
Jonathan Bennett
2020-03-13 15:37:54 +00:00
committed by Simon Butcher
parent 0f14c15842
commit b9082ed820
+1 -1
View File
@@ -2023,7 +2023,7 @@ cleanup:
goto cleanup;
}
if( !S_ISREG( sb.st_mode ) )
if( !( S_ISREG( sb.st_mode ) || S_ISLNK( sb.st_mode ) ) )
continue;
// Ignore parse errors