summaryrefslogtreecommitdiff
path: root/fipstest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fipstest.cpp')
-rw-r--r--fipstest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/fipstest.cpp b/fipstest.cpp
index a7419821..132c6510 100644
--- a/fipstest.cpp
+++ b/fipstest.cpp
@@ -328,21 +328,21 @@ bool IntegrityCheckModule(const char *moduleFilename, const byte *expectedModule
{
std::ostringstream oss;
oss << "Crypto++ DLL loaded at base address 0x" << std::hex << h << ".\n";
- OutputDebugString(oss.str().c_str());
+ OutputDebugStringA(oss.str().c_str());
}
else
{
std::ostringstream oss;
oss << "Crypto++ DLL integrity check may fail. Expected module base address is 0x";
oss << std::hex << g_BaseAddressOfMAC << ", but module loaded at 0x" << h << ".\n";
- OutputDebugString(oss.str().c_str());
+ OutputDebugStringA(oss.str().c_str());
}
#endif
if (!moduleStream)
{
#ifdef CRYPTOPP_WIN32_AVAILABLE
- OutputDebugString("Crypto++ DLL integrity check failed. Cannot open file for reading.");
+ OutputDebugStringA("Crypto++ DLL integrity check failed. Cannot open file for reading.");
#endif
return false;
}
@@ -400,7 +400,7 @@ bool IntegrityCheckModule(const char *moduleFilename, const byte *expectedModule
}
}
-#if defined(_MSC_VER) && _MSC_VER >= 1400
+#if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(_M_ARM)
// first byte of _CRT_DEBUGGER_HOOK gets modified in memory by the debugger invisibly, so read it from file
if (IsDebuggerPresent())
{
@@ -436,7 +436,7 @@ bool IntegrityCheckModule(const char *moduleFilename, const byte *expectedModule
// hash from disk instead
if (!VerifyBufsEqual(expectedModuleMac, actualMac, macSize))
{
- OutputDebugString("Crypto++ DLL in-memory integrity check failed. This may be caused by debug breakpoints or DLL relocation.\n");
+ OutputDebugStringA("Crypto++ DLL in-memory integrity check failed. This may be caused by debug breakpoints or DLL relocation.\n");
moduleStream.clear();
moduleStream.seekg(0);
verifier.Initialize(MakeParameters(Name::OutputBuffer(), ByteArrayParameter(actualMac, (unsigned int)actualMac.size())));
@@ -455,7 +455,7 @@ bool IntegrityCheckModule(const char *moduleFilename, const byte *expectedModule
#ifdef CRYPTOPP_WIN32_AVAILABLE
std::string hexMac;
HexEncoder(new StringSink(hexMac)).PutMessageEnd(actualMac, actualMac.size());
- OutputDebugString((("Crypto++ DLL integrity check failed. Actual MAC is: " + hexMac) + ".\n").c_str());
+ OutputDebugStringA((("Crypto++ DLL integrity check failed. Actual MAC is: " + hexMac) + ".\n").c_str());
#endif
return false;
}