diff --git a/messagecomposer.cpp b/messagecomposer.cpp index b3b0b4c90..17d5841af 100644 --- a/messagecomposer.cpp +++ b/messagecomposer.cpp @@ -86,6 +86,7 @@ #include #include +#include #include // ## keep default values in sync with configuredialog.cpp, Security::CryptoTab::setup() @@ -2177,6 +2178,11 @@ void MessageComposer::pgpSignedMsg( const QByteArray& cText, Kleo::CryptoMessage QByteArray signature; const GpgME::SigningResult res = job->exec( signingKeys, cText, signingMode( format ), signature ); + { + std::stringstream ss; + ss << res; + kdDebug(5006) << ss.str().c_str() << endl; + } if ( res.error().isCanceled() ) { kdDebug() << "signing was canceled by user" << endl; return; @@ -2226,6 +2232,11 @@ Kpgp::Result MessageComposer::pgpEncryptedMsg( QByteArray & encryptedBody, const GpgME::EncryptionResult res = job->exec( encryptionKeys, cText, true /* we do ownertrust ourselves */, encryptedBody ); + { + std::stringstream ss; + ss << res; + kdDebug(5006) << ss.str().c_str() << endl; + } if ( res.error().isCanceled() ) { kdDebug() << "encryption was canceled by user" << endl; return Kpgp::Canceled; @@ -2269,6 +2280,11 @@ Kpgp::Result MessageComposer::pgpSignedAndEncryptedMsg( QByteArray & encryptedBo const std::pair res = job->exec( signingKeys, encryptionKeys, cText, false, encryptedBody ); + { + std::stringstream ss; + ss << res.first << '\n' << res.second; + kdDebug(5006) << ss.str().c_str() << endl; + } if ( res.first.error().isCanceled() || res.second.error().isCanceled() ) { kdDebug() << "encrypt/sign was canceled by user" << endl; return Kpgp::Canceled; diff --git a/objecttreeparser.cpp b/objecttreeparser.cpp index 3239590e8..6bdbf4ec7 100644 --- a/objecttreeparser.cpp +++ b/objecttreeparser.cpp @@ -108,6 +108,7 @@ // other headers #include +#include #include #include #include @@ -475,6 +476,9 @@ namespace KMail { cryptPlugError = CANT_VERIFY_SIGNATURES; } } + std::stringstream ss; + ss << result; + kdDebug(5006) << ss.str().c_str() << endl; signatures = result.signatures(); } @@ -718,6 +722,9 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, const std::pair res = job->exec( ciphertext, plainText ); const GpgME::DecryptionResult & decryptResult = res.first; const GpgME::VerificationResult & verifyResult = res.second; + std::stringstream ss; + ss << decryptResult << '\n' << verifyResult; + kdDebug(5006) << ss.str().c_str() << endl; signatureFound = verifyResult.signatures().size() > 0; signatures = verifyResult.signatures(); bDecryptionOk = !decryptResult.error();