summaryrefslogtreecommitdiffstats
path: root/kmail/objecttreeparser_p.cpp
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2026-03-10 06:33:44 +0300
committerAlexander Golubev <fatzer2@gmail.com>2026-03-10 06:47:36 +0300
commitaaf564ace324cba8f96be63c505293f3f893bcd8 (patch)
tree5fce384944d488f17862ed3fdc4e1de94ba00482 /kmail/objecttreeparser_p.cpp
parent71f8bc2d05c980afe0938e24b89a01460411fa2e (diff)
downloadtdepim-Fat-Zer/fix/kmail-sig-verify.tar.gz
tdepim-Fat-Zer/fix/kmail-sig-verify.zip
kmail: fix signature verification in cyphered messagesFat-Zer/fix/kmail-sig-verify
If messages were simultaneously encrypted and signed with GPG, kmail were incorrectly claiming that "The validity of the signature cannot be verified" when it were already verified. This patch fixes that by requesting the key after the DecryptVerify job. Also the commit has some minor refactoring like reordering arguments of writeOpaqueOrMultipartSignedData(). Closes: https://mirror.git.trinitydesktop.org/gitea/TDE/tdepim/issues/187 Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Diffstat (limited to 'kmail/objecttreeparser_p.cpp')
-rw-r--r--kmail/objecttreeparser_p.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/kmail/objecttreeparser_p.cpp b/kmail/objecttreeparser_p.cpp
index c0a5eef4..ce7afb10 100644
--- a/kmail/objecttreeparser_p.cpp
+++ b/kmail/objecttreeparser_p.cpp
@@ -133,8 +133,10 @@ GenericVerifyMemento::~GenericVerifyMemento() {
m_keylistjob->slotCancel();
}
-DecryptVerifyBodyPartMemento::DecryptVerifyBodyPartMemento( DecryptVerifyJob * job, const TQByteArray & cipherText )
- : CryptoBodyPartMemento(),
+DecryptVerifyBodyPartMemento::DecryptVerifyBodyPartMemento( DecryptVerifyJob * job,
+ Kleo::KeyListJob * klj,
+ const TQByteArray & cipherText )
+ : GenericVerifyMemento(klj),
m_cipherText( cipherText ),
m_job( job )
{
@@ -166,6 +168,8 @@ void DecryptVerifyBodyPartMemento::exec() {
saveResult( p.first, p.second, plainText );
m_job->deleteLater(); // exec'ed jobs don't delete themselves
m_job = 0;
+ execKeyListJob();
+ setRunning( false );
}
void DecryptVerifyBodyPartMemento::saveResult( const DecryptionResult & dr,
@@ -175,7 +179,7 @@ void DecryptVerifyBodyPartMemento::saveResult( const DecryptionResult & dr,
assert( m_job );
setRunning( false );
m_dr = dr;
- m_vr = vr;
+ setVerificationResult( vr );
m_plainText = plainText;
setAuditLog( m_job->auditLogError(), m_job->auditLogAsHtml() );
}
@@ -187,6 +191,10 @@ void DecryptVerifyBodyPartMemento::slotResult( const DecryptionResult & dr,
saveResult( dr, vr, plainText );
setRunning( false );
m_job = 0;
+ if ( startKeyListJob() )
+ return;
+ destroyKeyListJob();
+ setRunning( false );
notify();
}