Skip to content

Commit 165b4c9

Browse files
authored
[release/8.0-staging] Fix OpenSsl directory store refresh frequency
1 parent c10888f commit 165b4c9

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/OpenSslCachedDirectoryStoreProvider.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ internal SafeX509StackHandle GetNativeCollection()
4646
{
4747
_storeDirectoryInfo.Refresh();
4848
DirectoryInfo info = _storeDirectoryInfo;
49+
ret = _nativeCollection;
50+
elapsed = _recheckStopwatch.Elapsed;
4951

5052
if (ret == null ||
5153
_forceRefresh ||

src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/OpenSslCachedSystemStoreProvider.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ private static Tuple<SafeX509StackHandle, SafeX509StackHandle> GetCollections()
9393
{
9494
lock (s_recheckStopwatch)
9595
{
96+
ret = s_nativeCollections;
97+
elapsed = s_recheckStopwatch.Elapsed;
98+
9699
if (ret == null ||
97100
elapsed > s_assumeInvalidInterval ||
98101
LastWriteTimesHaveChanged())

0 commit comments

Comments
 (0)