From 401dbbc7d5a1a6aa89921898dfe997e981e0404e Mon Sep 17 00:00:00 2001 From: Silent Date: Thu, 4 Jul 2019 23:35:26 +0200 Subject: [PATCH] Disable integrity checks in Debug Close #5884 --- PowerEditor/src/MISC/Common/verifySignedfile.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PowerEditor/src/MISC/Common/verifySignedfile.cpp b/PowerEditor/src/MISC/Common/verifySignedfile.cpp index 6bc676ee5..7ff380887 100644 --- a/PowerEditor/src/MISC/Common/verifySignedfile.cpp +++ b/PowerEditor/src/MISC/Common/verifySignedfile.cpp @@ -62,12 +62,21 @@ SecurityGard::SecurityGard() bool SecurityGard::checkModule(const std::wstring& filePath, NppModule module2check) { +#ifndef _DEBUG if (_securityMode == sm_certif) return verifySignedLibrary(filePath, module2check); else if (_securityMode == sm_sha256) return checkSha256(filePath, module2check); else 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)