summaryrefslogtreecommitdiff
path: root/osrng.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'osrng.cpp')
-rw-r--r--osrng.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/osrng.cpp b/osrng.cpp
index c310575..52d1f53 100644
--- a/osrng.cpp
+++ b/osrng.cpp
@@ -85,7 +85,7 @@ void NonblockingRng::GenerateBlock(byte *output, size_t size)
{
#ifdef CRYPTOPP_WIN32_AVAILABLE
# ifdef WORKAROUND_MS_BUG_Q258000
- static MicrosoftCryptoProvider m_Provider;
+ const MicrosoftCryptoProvider &m_Provider = Singleton<MicrosoftCryptoProvider>().Ref();
# endif
if (!CryptGenRandom(m_Provider.GetProviderHandle(), (DWORD)size, output))
throw OS_RNG_Err("CryptGenRandom");