From 85de7a60186c23f4cc9fc10ff71a8bdcc17986bb Mon Sep 17 00:00:00 2001 From: Janos Follath Date: Tue, 4 Feb 2020 14:12:03 +0000 Subject: [PATCH] Revert "Merge pull request #3008 from jp-bennett/development" This reverts commit c0c92fea3d105519a03a0cd1c5aa9f4f6093ab08, reversing changes made to bfc73bcfd2585311c8e671e0817045a95628c6fd. 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 2f6480ec84..5bc8f61f00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,8 +8,6 @@ New deprecations * Deprecate MBEDTLS_SSL_PROTO_SSL3 that enables support for SSLv3. 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. * Fix build failure with MBEDTLS_ZLIB_SUPPORT enabled. Reported by Jack Lloyd in #2859. Fix submitted by jiblime in #2963. diff --git a/library/x509_crt.c b/library/x509_crt.c index ca60011f7c..38e69cc550 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -1613,7 +1613,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