Fix fipstest.cpp compile under Unix (Issue 314)

pull/326/head
Jeffrey Walton 2016-10-02 22:25:16 -04:00
parent 07d996628d
commit 3feb08f0ba
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 2 additions and 4 deletions

View File

@ -331,23 +331,21 @@ bool IntegrityCheckModule(const char *moduleFilename, const byte *expectedModule
#endif #endif
} }
#ifdef CRYPTOPP_WIN32_AVAILABLE
if (h == g_BaseAddressOfMAC) if (h == g_BaseAddressOfMAC)
{ {
std::ostringstream oss; std::ostringstream oss;
oss << "Crypto++ DLL loaded at base address 0x" << std::hex << h << ".\n"; oss << "Crypto++ DLL loaded at base address 0x" << std::hex << h << ".\n";
#ifdef CRYPTOPP_WIN32_AVAILABLE
OutputDebugString(oss.str().c_str()); OutputDebugString(oss.str().c_str());
#endif
} }
else else
{ {
std::ostringstream oss; std::ostringstream oss;
oss << "Crypto++ DLL integrity check may fail. Expected module base address is 0x"; 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"; oss << std::hex << g_BaseAddressOfMAC << ", but module loaded at 0x" << h << ".\n";
#ifdef CRYPTOPP_WIN32_AVAILABLE
OutputDebugString(oss.str().c_str()); OutputDebugString(oss.str().c_str());
#endif
} }
#endif
if (!moduleStream) if (!moduleStream)
{ {