Merge pull request #3008 from jp-bennett/development

Allow loading symlinked certificates
diff --git a/ChangeLog b/ChangeLog
index be6b5d7..17d2aae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 mbed TLS ChangeLog (Sorted per branch, date)
 
+= mbed TLS X.X.X branch released XXXX-XX-XX
+
+Bugfix
+   * Allow loading symlinked certificates. Fixes #3005. Reported and fixed
+     by Jonathan Bennett <JBennett@incomsystems.biz> via #3008.
+
 = mbed TLS 2.20.0 branch released 2020-01-15
 
 Default behavior changes
diff --git a/library/x509_crt.c b/library/x509_crt.c
index 38e69cc..ca60011 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -1613,7 +1613,7 @@
             goto cleanup;
         }
 
-        if( !S_ISREG( sb.st_mode ) )
+        if( !( S_ISREG( sb.st_mode ) || S_ISLNK( sb.st_mode ) ) )
             continue;
 
         // Ignore parse errors