[Kde-pim] KMail and "encrypt to self" issue

Alexis Papadopoulos iacp at free.fr
Wed Aug 22 11:26:15 BST 2007


Finally some hints...

The issue can apparently be fixed by using gpg-agent. When the latter is 
running, pinentry comes up and asks for the passphrase to be able to decrypt 
the message. If not, gpg returns something like "MISSING PASSPHRASE..." which 
is more or less dealt with in KMail by printing a "bad passphrase" error in 
the message reader.

Now, I also found something explaining why I can't decrypt ANY mail that comes 
from one of my KMail clients, while those sent by Thunderbird/Outlook/etc. 
work fine without gpg-agent. It has apparently something to do with the 
structure of the mail. KMail generates a "application/pgp-encrypted" 
Content-Type which is handled by the 
ObjectTreeParser::processMultiPartEncryptedSubtype method, which then calls 
okDecryptMIME, which (finally!) uses cryptplug. The other client I tested, 
inserts the pgp encrypted mail in a "text/plain" Content-Type, which is 
handled by the ObjectTreeParser::processTextPlainSubtype, ending up in 
KMail::ObjectTreeParser::writeBodyStr which uses Kpgp for the decryption.

Anyway, long story short, the issue comes up when using cryptplug for the 
decryption, since it depends, for some reason, on gpg-agent for getting the 
passphrases. Using Kpgp does not lead to this issue.

Can some KMail dev tell me why isn't Kpgp used in both cases (or cryptplug for 
that matter) ? I honestly don't know either of them (still learning KMail 
actually) so maybe the answer is straightforward...

I'll try and look at Kgpg's and cryptplug's code (both relying on gpgme) in 
order to see why does the latter not provide a mean to insert the passphrase 
when gpg-agent is not available... Any info on that matter is more than 
welcomed !

Thanks in advance for your help,
acp
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list