summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-03-21 07:50:30 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-03-21 07:50:30 +0000
commitc0b69c9d19bd817a4f6e4cd58338ad06107a745e (patch)
tree135f84be01bdbe750df17a81cb6d7ef9fa1e529e
parentbab6ce107cd7a47caaad689466dc1dbe94f1940b (diff)
downloadcryptopp-c0b69c9d19bd817a4f6e4cd58338ad06107a745e.tar.gz
minor changes
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@46 57ff6487-cd31-0410-9ec3-f628ee90f5f0
-rw-r--r--Readme.txt11
-rw-r--r--wait.cpp41
2 files changed, 32 insertions, 20 deletions
diff --git a/Readme.txt b/Readme.txt
index 01f325a..d9ca490 100644
--- a/Readme.txt
+++ b/Readme.txt
@@ -233,20 +233,23 @@ History
AESEncryption and AESDecryption are now AES::Encryption and AES::Decryption
- where possible, typedefs have been added to improve backwards
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
- - is being evaluated for FIPS 140-2 compliance
- fixed a bug in HMAC::TruncatedFinal()
- fixed SKIPJACK byte ordering following NIST clarification dated 5/9/02
5.01 (special FIPS 140-2 release, in development)
- 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
- 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 standard conformance bugs in DLIES (DHAES mode) and RW/EMSA2
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
diff --git a/wait.cpp b/wait.cpp
index 99a2ad4..05d485b 100644
--- a/wait.cpp
+++ b/wait.cpp
@@ -47,27 +47,34 @@ struct WaitingThreadData
WaitObjectContainer::~WaitObjectContainer()
{
- if (!m_threads.empty())
+ try // don't let exceptions escape destructor
{
- HANDLE threadHandles[MAXIMUM_WAIT_OBJECTS];
- unsigned int i;
- for (i=0; i<m_threads.size(); i++)
+ if (!m_threads.empty())
{
- 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;
+ HANDLE threadHandles[MAXIMUM_WAIT_OBJECTS];
+ unsigned int i;
+ for (i=0; i<m_threads.size(); i++)
+ {
+ 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);
- for (i=0; i<m_threads.size(); i++)
- CloseHandle(threadHandles[i]);
- CloseHandle(m_startWaiting);
- CloseHandle(m_stopWaiting);
+ }
+ catch (...)
+ {
}
}
+
void WaitObjectContainer::AddHandle(HANDLE handle)
{
m_handles.push_back(handle);
@@ -86,7 +93,7 @@ DWORD WINAPI WaitingThread(LPVOID lParam)
thread.waitingToWait = false;
if (thread.terminate)
- return S_OK;
+ break;
if (!thread.count)
continue;
@@ -105,6 +112,8 @@ DWORD WINAPI WaitingThread(LPVOID lParam)
*thread.error = ::GetLastError();
}
}
+
+ return S_OK; // return a value here to avoid compiler warning
}
void WaitObjectContainer::CreateThreads(unsigned int count)