mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-28 19:21:08 +00:00
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:
parent
dbcb44202c
commit
fdc16f36b4
@ -1613,7 +1613,7 @@ cleanup:
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !S_ISREG( sb.st_mode ) )
|
if( !( S_ISREG( sb.st_mode ) || S_ISLNK( sb.st_mode ) ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Ignore parse errors
|
// Ignore parse errors
|
||||||
|
Loading…
x
Reference in New Issue
Block a user