minor changes
parent
3be2371e42
commit
59d3b374cb
11
Readme.txt
11
Readme.txt
|
|
@ -233,20 +233,23 @@ History
|
||||||
AESEncryption and AESDecryption are now AES::Encryption and AES::Decryption
|
AESEncryption and AESDecryption are now AES::Encryption and AES::Decryption
|
||||||
- where possible, typedefs have been added to improve backwards
|
- where possible, typedefs have been added to improve backwards
|
||||||
compatibility when the CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY macro is defined
|
compatibility when the CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY macro is defined
|
||||||
- changed HAVAL and IDEA to use public domain code
|
- changed Serpent, HAVAL and IDEA to use public domain code
|
||||||
- implemented SSE2 optimizations for Integer operations
|
- implemented SSE2 optimizations for Integer operations
|
||||||
- is being evaluated for FIPS 140-2 compliance
|
|
||||||
- fixed a bug in HMAC::TruncatedFinal()
|
- fixed a bug in HMAC::TruncatedFinal()
|
||||||
- fixed SKIPJACK byte ordering following NIST clarification dated 5/9/02
|
- fixed SKIPJACK byte ordering following NIST clarification dated 5/9/02
|
||||||
|
|
||||||
5.01 (special FIPS 140-2 release, in development)
|
5.01 (special FIPS 140-2 release, in development)
|
||||||
- added known answer test for X9.17 RNG in FIPS 140 power-up self test
|
- added known answer test for X9.17 RNG in FIPS 140 power-up self test
|
||||||
|
- is being evaluated for FIPS 140-2 compliance
|
||||||
|
|
||||||
5.1 - added PSS padding and changed PSSR to track IEEE P1363a draft standard
|
5.1 - added PSS padding and changed PSSR to track IEEE P1363a draft standard
|
||||||
- added blinding for RSA and Rabin to defend against timing attacks
|
- added blinding for RSA and Rabin to defend against timing attacks
|
||||||
on decryption operations (required API changes for decryption)
|
on decryption operations
|
||||||
|
- changed signing and decryption APIs to support the above
|
||||||
|
- changed WaitObjectContainer to allow waiting for more than 64
|
||||||
|
objects at a time on Win32 platforms
|
||||||
- fixed a bug in CBC and ECB modes with processing non-aligned data
|
- fixed a bug in CBC and ECB modes with processing non-aligned data
|
||||||
- fixed standard conformance bugs in DLIES (DHAES mode) and RW/EMSA2
|
- fixed standard conformance bugs in DLIES (DHAES mode) and RW/EMSA2
|
||||||
signature scheme (these fixes are not backwards compatible)
|
signature scheme (these fixes are not backwards compatible)
|
||||||
- fixed a number of minor bugs and portability problems
|
- fixed a number of compiler warnings, minor bugs, and portability problems
|
||||||
- removed Sapphire
|
- removed Sapphire
|
||||||
|
|
|
||||||
41
wait.cpp
41
wait.cpp
|
|
@ -47,27 +47,34 @@ struct WaitingThreadData
|
||||||
|
|
||||||
WaitObjectContainer::~WaitObjectContainer()
|
WaitObjectContainer::~WaitObjectContainer()
|
||||||
{
|
{
|
||||||
if (!m_threads.empty())
|
try // don't let exceptions escape destructor
|
||||||
{
|
{
|
||||||
HANDLE threadHandles[MAXIMUM_WAIT_OBJECTS];
|
if (!m_threads.empty())
|
||||||
unsigned int i;
|
|
||||||
for (i=0; i<m_threads.size(); i++)
|
|
||||||
{
|
{
|
||||||
WaitingThreadData &thread = *m_threads[i];
|
HANDLE threadHandles[MAXIMUM_WAIT_OBJECTS];
|
||||||
while (!thread.waitingToWait) // spin until thread is in the initial "waiting to wait" state
|
unsigned int i;
|
||||||
Sleep(0);
|
for (i=0; i<m_threads.size(); i++)
|
||||||
thread.terminate = true;
|
{
|
||||||
threadHandles[i] = thread.threadHandle;
|
WaitingThreadData &thread = *m_threads[i];
|
||||||
|
while (!thread.waitingToWait) // spin until thread is in the initial "waiting to wait" state
|
||||||
|
Sleep(0);
|
||||||
|
thread.terminate = true;
|
||||||
|
threadHandles[i] = thread.threadHandle;
|
||||||
|
}
|
||||||
|
PulseEvent(m_startWaiting);
|
||||||
|
::WaitForMultipleObjects(m_threads.size(), threadHandles, TRUE, INFINITE);
|
||||||
|
for (i=0; i<m_threads.size(); i++)
|
||||||
|
CloseHandle(threadHandles[i]);
|
||||||
|
CloseHandle(m_startWaiting);
|
||||||
|
CloseHandle(m_stopWaiting);
|
||||||
}
|
}
|
||||||
PulseEvent(m_startWaiting);
|
}
|
||||||
::WaitForMultipleObjects(m_threads.size(), threadHandles, TRUE, INFINITE);
|
catch (...)
|
||||||
for (i=0; i<m_threads.size(); i++)
|
{
|
||||||
CloseHandle(threadHandles[i]);
|
|
||||||
CloseHandle(m_startWaiting);
|
|
||||||
CloseHandle(m_stopWaiting);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void WaitObjectContainer::AddHandle(HANDLE handle)
|
void WaitObjectContainer::AddHandle(HANDLE handle)
|
||||||
{
|
{
|
||||||
m_handles.push_back(handle);
|
m_handles.push_back(handle);
|
||||||
|
|
@ -86,7 +93,7 @@ DWORD WINAPI WaitingThread(LPVOID lParam)
|
||||||
thread.waitingToWait = false;
|
thread.waitingToWait = false;
|
||||||
|
|
||||||
if (thread.terminate)
|
if (thread.terminate)
|
||||||
return S_OK;
|
break;
|
||||||
if (!thread.count)
|
if (!thread.count)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
@ -105,6 +112,8 @@ DWORD WINAPI WaitingThread(LPVOID lParam)
|
||||||
*thread.error = ::GetLastError();
|
*thread.error = ::GetLastError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return S_OK; // return a value here to avoid compiler warning
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaitObjectContainer::CreateThreads(unsigned int count)
|
void WaitObjectContainer::CreateThreads(unsigned int count)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue