From b40d60f0966561873a29e10a9f174cc4dcf61e32 Mon Sep 17 00:00:00 2001 From: Janos Follath Date: Tue, 4 Feb 2020 14:47:45 +0000 Subject: [PATCH] Revert "Merge pull request #3011 from Patater/dev/jp-bennett/development-2.7" This reverts commit 130e1364393f92df5bd1377b9eeab4c388cf509b, reversing changes made to 071b3e170e6a10ca523f9ed561394584d7a982f4. stat() will never return S_IFLNK as the file type, as stat() explicitly follows symlinks. Fixes #3005. --- ChangeLog | 2 -- library/x509_crt.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0dac49721..4fe9c94bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,8 +10,6 @@ Security ARMmbed/mbed-crypto#352 Bugfix - * Allow loading symlinked certificates. Fixes #3005. Reported and fixed - by Jonathan Bennett via #3008. * Fix an unchecked call to mbedtls_md() in the x509write module. = mbed TLS 2.7.13 branch released 2020-01-15 diff --git a/library/x509_crt.c b/library/x509_crt.c index 55c7ea108..3ad53a715 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -1207,7 +1207,7 @@ cleanup: goto cleanup; } - if( !( S_ISREG( sb.st_mode ) || S_ISLNK( sb.st_mode ) ) ) + if( !S_ISREG( sb.st_mode ) ) continue; // Ignore parse errors