[Kde-pim] Disabling signing after saving a draft

Alexis Papadopoulos iacp at free.fr
Thu Jun 28 15:06:36 BST 2007


Ok, I have something that works now. The problem with IMAP accounts was that, 
altough headers were properly parsed, the encryption and signature (at least 
those two) ones were ignored.

I'm sending the patch for this, but I need to mention a couple of issues that 
might come up:

_ the modifications in headeritem.cpp: I don't know if the key generation is 
for the index or not, but by modifying the switch (see path), that could be a 
small problem since s="5" now is not the default case anymore

_ KMMsgSignatureTemporarilyDisabled means that the message is not signed, 
therefore the modifications in kmcommans.cpp, but I'm not 100% certain about 
those, someone needs to check

_ same comment for kmfolderimap.cpp and modification in 
KMReaderWin::slotTouchMessage()

_ last but NOT least, kmmessage.cpp, KMMessage::fromDwString
a quick couple of greps showed that the boolean passed as parameter is always 
set to false (might be wrong though). Even if set to true, I didn't 
understand the following lines:

  if (aSetStatus) {
    setStatus(headerField("Status").latin1(), headerField("X-Status").latin1
());
    setEncryptionStateChar( headerField("X-KMail-EncryptionState").at(0) );
    setSignatureStateChar(  headerField("X-KMail-SignatureState").at(0) );
    setMDNSentState( static_cast<KMMsgMDNSentState>( 
headerField("X-KMail-MDN-Sent").at(0).latin1() ) );
  }

since they don't make use of the newly parsed information, therefore I added 
this :
  if ( mMsg->Headers().FindField("X-KMail-SignatureState") )
    setSignatureStateChar( 
mMsg->Headers().FindField("X-KMail-SignatureState")->FieldBodyStr().at(0) );
  if ( mMsg->Headers().FindField("X-KMail-EncryptionState") )
    setEncryptionStateChar( 
mMsg->Headers().FindField("X-KMail-EncryptionState")->FieldBodyStr().at(0) );



Now, enough with the modifications. I fell on some other issues, unrelated to 
the above patch. Steps to undertake:
_ create a new message and save a draft (signed, so the option "never sign & 
encrypt when saving drafts" needs to be unchecked) without adding any body 
content
_ re-open it, uncheck the signature button and resave as draft
_ if you check the headers, the X-KMail-SignatureState is still on F (for 
fully signed), although there is no signed content

Small issue, but thought I should mention it.

Keep me posted if something seems wrong with the patch,
Alexis

P.S: If it seems right, please close http://bugs.kde.org/103240

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 12032 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20070628/416b290c/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20070628/416b290c/attachment.sig>
-------------- next part --------------
_______________________________________________
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