summaryrefslogtreecommitdiff
path: root/plugins/CryptoPP
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CryptoPP')
-rw-r--r--plugins/CryptoPP/crypto/src/fipstest.cpp4
-rw-r--r--plugins/CryptoPP/crypto/src/hrtimer.cpp2
-rw-r--r--plugins/CryptoPP/crypto/src/osrng.cpp2
-rw-r--r--plugins/CryptoPP/crypto/src/wait.cpp10
-rw-r--r--plugins/CryptoPP/crypto/src/winpipes.cpp6
-rw-r--r--plugins/CryptoPP/src/main.cpp4
6 files changed, 14 insertions, 14 deletions
diff --git a/plugins/CryptoPP/crypto/src/fipstest.cpp b/plugins/CryptoPP/crypto/src/fipstest.cpp
index d65730b010..685dd1e841 100644
--- a/plugins/CryptoPP/crypto/src/fipstest.cpp
+++ b/plugins/CryptoPP/crypto/src/fipstest.cpp
@@ -318,7 +318,7 @@ bool IntegrityCheckModule(const char *moduleFilename, const byte *expectedModule
const IMAGE_DOS_HEADER *ph = (IMAGE_DOS_HEADER *)memBase;
const IMAGE_NT_HEADERS *phnt = (IMAGE_NT_HEADERS *)(memBase + ph->e_lfanew);
const IMAGE_SECTION_HEADER *phs = IMAGE_FIRST_SECTION(phnt);
- DWORD nSections = phnt->FileHeader.NumberOfSections;
+ uint32_t nSections = phnt->FileHeader.NumberOfSections;
size_t currentFilePos = 0;
size_t checksumPos = (byte *)&phnt->OptionalHeader.CheckSum - memBase;
@@ -599,7 +599,7 @@ NAMESPACE_END
// DllMain needs to be in the global namespace
BOOL APIENTRY DllMain(HANDLE hModule,
- DWORD ul_reason_for_call,
+ uint32_t ul_reason_for_call,
LPVOID lpReserved)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
diff --git a/plugins/CryptoPP/crypto/src/hrtimer.cpp b/plugins/CryptoPP/crypto/src/hrtimer.cpp
index 4a1cc79ec5..029a6e7fd9 100644
--- a/plugins/CryptoPP/crypto/src/hrtimer.cpp
+++ b/plugins/CryptoPP/crypto/src/hrtimer.cpp
@@ -103,7 +103,7 @@ TimerWord ThreadUserTimer::GetCurrentTimerValue()
FILETIME now, ignored;
if (!GetThreadTimes(GetCurrentThread(), &ignored, &ignored, &ignored, &now))
{
- DWORD lastError = GetLastError();
+ uint32_t lastError = GetLastError();
if (lastError == ERROR_CALL_NOT_IMPLEMENTED)
{
getCurrentThreadImplemented = false;
diff --git a/plugins/CryptoPP/crypto/src/osrng.cpp b/plugins/CryptoPP/crypto/src/osrng.cpp
index 22f13e65d1..c841abf02c 100644
--- a/plugins/CryptoPP/crypto/src/osrng.cpp
+++ b/plugins/CryptoPP/crypto/src/osrng.cpp
@@ -77,7 +77,7 @@ void NonblockingRng::GenerateBlock(byte *output, size_t size)
# ifdef WORKAROUND_MS_BUG_Q258000
const MicrosoftCryptoProvider &m_Provider = Singleton<MicrosoftCryptoProvider>().Ref();
# endif
- if (!CryptGenRandom(m_Provider.GetProviderHandle(), (DWORD)size, output))
+ if (!CryptGenRandom(m_Provider.GetProviderHandle(), (uint32_t)size, output))
throw OS_RNG_Err("CryptGenRandom");
#else
if (read(m_fd, output, size) != size)
diff --git a/plugins/CryptoPP/crypto/src/wait.cpp b/plugins/CryptoPP/crypto/src/wait.cpp
index b031922638..aabdc21dc8 100644
--- a/plugins/CryptoPP/crypto/src/wait.cpp
+++ b/plugins/CryptoPP/crypto/src/wait.cpp
@@ -105,7 +105,7 @@ struct WaitingThreadData
unsigned int count;
HANDLE threadHandle;
DWORD threadId;
- DWORD* error;
+ DWORD *error;
};
WaitObjectContainer::~WaitObjectContainer()
@@ -125,7 +125,7 @@ WaitObjectContainer::~WaitObjectContainer()
threadHandles[i] = thread.threadHandle;
}
PulseEvent(m_startWaiting);
- ::WaitForMultipleObjects((DWORD)m_threads.size(), threadHandles, TRUE, INFINITE);
+ ::WaitForMultipleObjects((uint32_t)m_threads.size(), threadHandles, TRUE, INFINITE);
for (i=0; i<m_threads.size(); i++)
CloseHandle(threadHandles[i]);
CloseHandle(m_startWaiting);
@@ -165,7 +165,7 @@ DWORD WINAPI WaitingThread(LPVOID lParam)
handles[0] = thread.stopWaiting;
std::copy(thread.waitHandles, thread.waitHandles+thread.count, handles.begin()+1);
- DWORD result = ::WaitForMultipleObjects((DWORD)handles.size(), &handles[0], FALSE, INFINITE);
+ uint32_t result = ::WaitForMultipleObjects((uint32_t)handles.size(), &handles[0], FALSE, INFINITE);
if (result == WAIT_OBJECT_0)
continue; // another thread finished waiting first, so do nothing
@@ -262,7 +262,7 @@ bool WaitObjectContainer::Wait(unsigned long milliseconds)
ResetEvent(m_stopWaiting);
PulseEvent(m_startWaiting);
- DWORD result = ::WaitForSingleObject(m_stopWaiting, milliseconds);
+ uint32_t result = ::WaitForSingleObject(m_stopWaiting, milliseconds);
if (result == WAIT_OBJECT_0)
{
if (error == S_OK)
@@ -286,7 +286,7 @@ bool WaitObjectContainer::Wait(unsigned long milliseconds)
static unsigned long lastTime = 0;
unsigned long timeBeforeWait = t.ElapsedTime();
#endif
- DWORD result = ::WaitForMultipleObjects((DWORD)m_handles.size(), &m_handles[0], FALSE, milliseconds);
+ uint32_t result = ::WaitForMultipleObjects((uint32_t)m_handles.size(), &m_handles[0], FALSE, milliseconds);
#if TRACE_WAIT
if (milliseconds > 0)
{
diff --git a/plugins/CryptoPP/crypto/src/winpipes.cpp b/plugins/CryptoPP/crypto/src/winpipes.cpp
index ea9843973b..e9c6d501ed 100644
--- a/plugins/CryptoPP/crypto/src/winpipes.cpp
+++ b/plugins/CryptoPP/crypto/src/winpipes.cpp
@@ -65,7 +65,7 @@ void WindowsHandle::CloseHandle()
void WindowsPipe::HandleError(const char *operation) const
{
- DWORD err = GetLastError();
+ uint32_t err = GetLastError();
throw Err(GetHandle(), operation, err);
}
@@ -92,7 +92,7 @@ bool WindowsPipeReceiver::Receive(byte* buf, size_t bufLen)
HANDLE h = GetHandle();
// don't queue too much at once, or we might use up non-paged memory
- if (ReadFile(h, buf, UnsignedMin((DWORD)128*1024, bufLen), &m_lastResult, &m_overlapped))
+ if (ReadFile(h, buf, UnsignedMin((uint32_t)128*1024, bufLen), &m_lastResult, &m_overlapped))
{
if (m_lastResult == 0)
m_eofReceived = true;
@@ -166,7 +166,7 @@ void WindowsPipeSender::Send(const byte* buf, size_t bufLen)
DWORD written = 0;
HANDLE h = GetHandle();
// don't queue too much at once, or we might use up non-paged memory
- if (WriteFile(h, buf, UnsignedMin((DWORD)128*1024, bufLen), &written, &m_overlapped))
+ if (WriteFile(h, buf, UnsignedMin((uint32_t)128*1024, bufLen), &written, &m_overlapped))
{
m_resultPending = false;
m_lastResult = written;
diff --git a/plugins/CryptoPP/src/main.cpp b/plugins/CryptoPP/src/main.cpp
index bdc059828a..f2e9ad05a0 100644
--- a/plugins/CryptoPP/src/main.cpp
+++ b/plugins/CryptoPP/src/main.cpp
@@ -55,7 +55,7 @@ int CMPlugin::Load()
/////////////////////////////////////////////////////////////////////////////////////////
-BOOL ExtractFileFromResource(HANDLE FH, int ResType, int ResId, DWORD* Size)
+BOOL ExtractFileFromResource(HANDLE FH, int ResType, int ResId, uint32_t* Size)
{
HRSRC RH = FindResource(g_plugin.getInst(), MAKEINTRESOURCE(ResId), MAKEINTRESOURCE(ResType));
if (RH == nullptr)
@@ -65,7 +65,7 @@ BOOL ExtractFileFromResource(HANDLE FH, int ResType, int ResId, DWORD* Size)
if (RP == nullptr)
return FALSE;
- DWORD x, s = SizeofResource(g_plugin.getInst(), RH);
+ DWORD x, s = SizeofResource(g_plugin.getInst(), RH);
if (!WriteFile(FH, RP, s, &x, nullptr)) return FALSE;
if (x != s) return FALSE;
if (Size) *Size = s;