Improve decrypt verify result display

This improves the look and information of the result
status display when verifying files.

The keys are now also fetched through GPGME and not
over the keycache to ensure that tofu information is
correct (if this is used). This also fixes a Bug
because previously signings subkeys (like the one
used to sign this commit) were not handled by
kleopatra's sig key lookup.

Although it's a bugfix it should stay in master
because of the string changes.

BUG: 340144
parent a56fc958
This diff is collapsed.
......@@ -247,8 +247,6 @@ public:
GpgME::VerificationResult verificationResult() const;
static const GpgME::Key &keyForSignature(const GpgME::Signature &sig, const std::vector<GpgME::Key> &keys);
private:
static QString keyToString(const GpgME::Key &key);
......
......@@ -225,9 +225,8 @@ void DecryptVerifyCommandEMailBase::Private::verificationResult(const Verificati
{
try {
const std::vector<Signature> sigs = vResult.signatures();
const std::vector<Key> signers = KeyCache::instance()->findSigners(vResult);
Q_FOREACH (const Signature &sig, sigs) {
const QString s = signatureToString(sig, DecryptVerifyResult::keyForSignature(sig, signers));
const QString s = signatureToString(sig, sig.key(true, true));
const char *color = summaryToString(sig.summary());
q->sendStatusEncoded("SIGSTATUS",
color + (' ' + hexencode(s.toUtf8().constData())));
......
......@@ -205,9 +205,8 @@ void DecryptVerifyCommandFilesBase::Private::verificationResult(const Verificati
{
try {
const std::vector<Signature> sigs = vResult.signatures();
const std::vector<Key> signers = KeyCache::instance()->findSigners(vResult);
for (const Signature &sig : sigs) {
const QString s = signatureToString(sig, DecryptVerifyResult::keyForSignature(sig, signers));
const QString s = signatureToString(sig, sig.key(true, true));
const char *color = summaryToString(sig.summary());
q->sendStatusEncoded("SIGSTATUS",
color + (' ' + hexencode(s.toUtf8().constData())));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment