Add root store directory fallback on Linux/Unix.
authorJeremy Barton <jbarton@microsoft.com>
Thu, 27 May 2021 21:47:21 +0000 (14:47 -0700)
committerGitHub <noreply@github.com>
Thu, 27 May 2021 21:47:21 +0000 (14:47 -0700)
commit28d3f317abe7697dcc6ccd08fd18dc417e73bde4
treeb0e9b483a9662c370458a1b1621b8e1962c41f4e
parentfe67c3f20e3c2f4a26e460abaa0c15b8ce3de9da
Add root store directory fallback on Linux/Unix.

When reading the root store directory for the first time, if
the read produced no data and the SSL_CERT_DIR environment
variable wasn't set, see if /etc/ssl/certs gives a different answer.

This change also changes the LastWriteTime model for caching
to not pin the symlink target on the first read, and support the
bundle file being a symlink (and the target being updated to
trigger refresh).
src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Crypto.cs
src/libraries/Native/Unix/System.Security.Cryptography.Native/pal_x509_root.c
src/libraries/Native/Unix/System.Security.Cryptography.Native/pal_x509_root.h
src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs