summaryrefslogtreecommitdiff
path: root/osrng.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2007-02-03 13:29:09 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2007-02-03 13:29:09 +0000
commita3dee01ac30b8833d283d50d8ce0143b6ae14aba (patch)
tree5f9476b17684a70e4774ab1a26cb0cace7194384 /osrng.cpp
parent94484a13f5d06114532764f0f94a7acbfa5acf22 (diff)
downloadcryptopp-a3dee01ac30b8833d283d50d8ce0143b6ae14aba.tar.gz
fix threading bug
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@278 57ff6487-cd31-0410-9ec3-f628ee90f5f0
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");