[pim/kleopatra/release/26.08] src/crypto: Fix check of protocol of detached signature
Ingo Klöcker <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 62747415f308fa39186e029427e6dfc5a458e41a by Ingo Klöcker, on behalf of Ingo Klöcker.
Committed on 29/07/2026 at 12:04.
Pushed by kloecker into branch 'release/26.08'.
Fix check of protocol of detached signature
The code erroneously checked the protocol of the signed file (which
very likely is neither an OpenPGP nor an S/MIME file). This had the
effect that the old data-based approach instead of the new file-based
approach was used to verify the signature.
GnuPG-bug-id: 8337
(cherry picked from commit 132a0099d61f1723630230af87a5c4b2cc50e551)
M +1 -1 src/crypto/decryptverifyfilescontroller.cpp
https://invent.kde.org/pim/kleopatra/-/commit/62747415f308fa39186e029427e6dfc5a458e41a
diff --git a/src/crypto/decryptverifyfilescontroller.cpp b/src/crypto/decryptverifyfilescontroller.cpp
index 50d660913..b4e8886e9 100644
--- a/src/crypto/decryptverifyfilescontroller.cpp
+++ b/src/crypto/decryptverifyfilescontroller.cpp
@@ -350,7 +350,7 @@ std::vector<std::shared_ptr<Task>> DecryptVerifyFilesController::Private::buildT
}
foundSig = true;
std::shared_ptr<VerifyDetachedTask> t(new VerifyDetachedTask);
- if (cFile.protocol == GpgME::OpenPGP) {
+ if (proto == GpgME::OpenPGP) {
t->setSignatureFile(sig);
t->setSignedFile(cFile.fileName);
} else {