mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-24 22:34:54 +02:00
parent
31ae813286
commit
401dbbc7d5
@ -62,12 +62,21 @@ SecurityGard::SecurityGard()
|
|||||||
|
|
||||||
bool SecurityGard::checkModule(const std::wstring& filePath, NppModule module2check)
|
bool SecurityGard::checkModule(const std::wstring& filePath, NppModule module2check)
|
||||||
{
|
{
|
||||||
|
#ifndef _DEBUG
|
||||||
if (_securityMode == sm_certif)
|
if (_securityMode == sm_certif)
|
||||||
return verifySignedLibrary(filePath, module2check);
|
return verifySignedLibrary(filePath, module2check);
|
||||||
else if (_securityMode == sm_sha256)
|
else if (_securityMode == sm_sha256)
|
||||||
return checkSha256(filePath, module2check);
|
return checkSha256(filePath, module2check);
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
#else
|
||||||
|
// Do not check integrity if npp is running in debug mode
|
||||||
|
// This is helpful for developers to skip signature checking
|
||||||
|
// while analyzing issue or modifying the lexer dll
|
||||||
|
(void)filePath;
|
||||||
|
(void)module2check;
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SecurityGard::checkSha256(const std::wstring& filePath, NppModule module2check)
|
bool SecurityGard::checkSha256(const std::wstring& filePath, NppModule module2check)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user