Version: (using Devel) Installed from: Compiled sources Compiler: gcc version 4.2.1 (SUSE Linux) OS: Linux When messages are encrypted using PGP, the MIME-part that's supposed to contain the encrypted mail stays empty, like this: --nextPart1711057.zOAskV6OyZ Content-Type: application/octet-stream Content-Disposition: inline; filename="msg.asc" --nextPart1711057.zOAskV6OyZ-- I think this is caused by a change in kdepim/libkleo/backends/qgpgme/qgpgmeencryptjob.cpp in SVN revision 784823. In Kleo::QGpgMEEncryptJob::doOperationDoneEvent a resetDataObjects() call was added, which would be fine if the code actually used the signal that's emitted with the retrieved results. However, Kleo::QGpgMEEncryptJob::exec simply calls outData() again after doOperationDoneEvent is called, which means the resulting ciphertext will always be empty.
Created attachment 24348 [details] Suggested fix for bug 160881
Thanks for investigating this! Indeed, the synchronous implementation seems broken. I think your fix isn't correct for the asynchronous case though, and would reintroduce the bug the resetDataObjects() call was supposed to fix. I don't see an easy way to fix this without breaking other assumptions made, I'll add the original author to CC.
SVN commit 798118 by osterfeld: do not reset data objects before exec() can read the outData. This fixes the synchronous libkleo API using the exec() methods (which returns empty QByteArrays without this patch) but breaks the shared_ptr<Output> usage (finalize() iirc) in kleopatra. define KLEO_SYNCHRONOUS_API_HOTFIX for now when build libkleo for use with KMail. proper fix pending. CCBUG:160881 CCMAIL:mutz@kde.org CCMAIL:adam@kde.org CCMAIL:js@iidea.pl M +6 -1 CMakeLists.txt M +2 -0 backends/qgpgme/qgpgmedecryptjob.cpp M +2 -0 backends/qgpgme/qgpgmedecryptverifyjob.cpp M +2 -0 backends/qgpgme/qgpgmeencryptjob.cpp M +2 -0 backends/qgpgme/qgpgmesignencryptjob.cpp M +2 -0 backends/qgpgme/qgpgmeverifydetachedjob.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=798118
I see this bug is still open. Encryption using GPG mostly works for me. Did the commit fix it?
Thank you for taking the time to file a bug report. KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2. We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.