From 47fee00857fbe64cd893a510fce3da8fd3fea126 Mon Sep 17 00:00:00 2001 From: Vitaliy Didik Date: Sat, 15 Apr 2023 19:38:23 +0300 Subject: [PATCH 1/3] Added .msu and .cab to list of extensions with signatures. --- source/trust.cpp | 2 +- source/version.m4i | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/trust.cpp b/source/trust.cpp index 6c99a71..0944089 100644 --- a/source/trust.cpp +++ b/source/trust.cpp @@ -7,7 +7,7 @@ bool FileCanHaveSignature(const wchar_t* path) { - static const wchar_t* SignatureExtensions[] = { L".exe", L".dll", L".msi" }; + static const wchar_t* SignatureExtensions[] = { L".exe", L".dll", L".msi", L".msu", L".cab"}; const wchar_t* ext = PathFindExtension(path); for (int i = 0; i < _countof(SignatureExtensions); ++i) diff --git a/source/version.m4i b/source/version.m4i index 3d5d74f..e6e2a77 100644 --- a/source/version.m4i +++ b/source/version.m4i @@ -1,4 +1,4 @@ m4_define(VMAJOR, `2')m4_dnl m4_define(VMINOR, `8')m4_dnl -m4_define(VREVISION, `2')m4_dnl +m4_define(VREVISION, `3')m4_dnl m4_define(PLUGIN_VERSION, `VMAJOR.VMINOR.VREVISION')m4_dnl From bb1fe21125991bbec7eba4f40c5dd6086d95f4e4 Mon Sep 17 00:00:00 2001 From: Vitaliy Didik Date: Sat, 15 Apr 2023 19:47:28 +0300 Subject: [PATCH 2/3] Fixed taskbar progress stuck when trying to verify signature on wrong file. --- source/IntChecker2-Far3.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source/IntChecker2-Far3.cpp b/source/IntChecker2-Far3.cpp index f2d0417..fe1aaa1 100644 --- a/source/IntChecker2-Far3.cpp +++ b/source/IntChecker2-Far3.cpp @@ -1254,8 +1254,7 @@ static void RunVerifySignatures(Far3Panel &panel) } std::vector filesToVerify; - bool allOk = true; - + FarAdvControl(ACTL_SETPROGRESSSTATE, TBPS_INDETERMINATE, NULL); // Prepare files list @@ -1267,16 +1266,13 @@ static void RunVerifySignatures(Far3Panel &panel) auto rm_it = std::remove_if(filesToVerify.begin(), filesToVerify.end(), [](PanelFileInfo &item) { return !FileCanHaveSignature(item.PanelPath.c_str()); }); filesToVerify.erase(rm_it, filesToVerify.end()); - if (filesToVerify.size() == 0) - { - DisplayMessage(MSG_DLG_ERROR, MSG_DLG_NO_FILES_SELECTED, NULL, true, true); - return; - } } + if (filesToVerify.size() > 0) { std::wstring strShortName; std::wstring strFileNum; + bool allOk = true; for (size_t i = 0; i < filesToVerify.size(); ++i) { @@ -1317,11 +1313,15 @@ static void RunVerifySignatures(Far3Panel &panel) } } } - } - if (allOk) - DisplayMessage(MSG_DLG_VALIDATION_COMPLETE, MSG_DLG_OPERATION_COMPLETE, nullptr, false, true); - + if (allOk) + DisplayMessage(MSG_DLG_VALIDATION_COMPLETE, MSG_DLG_OPERATION_COMPLETE, nullptr, false, true); + } + else + { + DisplayMessage(MSG_DLG_ERROR, MSG_DLG_NO_FILES_SELECTED, NULL, true, true); + } + FarAdvControl(ACTL_SETPROGRESSSTATE, TBPS_NOPROGRESS, NULL); FarAdvControl(ACTL_PROGRESSNOTIFY, 0, NULL); } From 37d332dfda47d0b087609843903b2ae474c45b86 Mon Sep 17 00:00:00 2001 From: Vitaliy Didik Date: Sat, 15 Apr 2023 21:39:44 +0300 Subject: [PATCH 3/3] Added MSP and EFI as signable extensions. --- source/trust.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/trust.cpp b/source/trust.cpp index 0944089..75b67a7 100644 --- a/source/trust.cpp +++ b/source/trust.cpp @@ -7,7 +7,7 @@ bool FileCanHaveSignature(const wchar_t* path) { - static const wchar_t* SignatureExtensions[] = { L".exe", L".dll", L".msi", L".msu", L".cab"}; + static const wchar_t* SignatureExtensions[] = { L".exe", L".dll", L".efi", L".msi", L".msu", L".msp", L".cab"}; const wchar_t* ext = PathFindExtension(path); for (int i = 0; i < _countof(SignatureExtensions); ++i)