Bug 2905

Summary: Include the signature timestamp in the 'full signature information'
Product: Claws Mail (GTK 2) Reporter: Fabian Keil <fk>
Component: Plugins/Privacy/PGPAssignee: users
Status: RESOLVED FIXED    
Severity: enhancement CC: mones
Priority: P3    
Version: 3.9.0   
Hardware: PC   
OS: FreeBSD   
Attachments:
Description Flags
Patch to include the signature timestamp in the 'full signature information' none

Description Fabian Keil 2013-04-09 13:30:32 UTC
Created attachment 1251 [details]
Patch to include the signature timestamp in the 'full signature information'

The attached patch includes the time the signature was made in the "full signature information".

It used the "Date format" configured for the summary which may not be ideal,
however I dislike the RFC 822 date "gpg --verify" uses and didn't want to
hard code my own preference.

Local time is used to be consistent with the summary.
Comment 1 users 2013-04-15 22:40:03 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=0f3a48d7db4a051e11fb8c56d25356d42b8643d8
Author: Ricardo Mones <ricardo@mones.org>
Date:   Tue Apr 16 00:33:49 2013 +0200

    Fix bug #2905 "Include the signature timestamp in the 'full signature information'"
    
    Format used is the same shown in summary view date column.
    Original patch by Fabian Keil, thanks! ;-)
Comment 2 Fabian Keil 2013-04-16 07:04:05 UTC
Thanks for taking care of this, Ricardo.

I didn't add the " on " myself, to keep the line consistent with the "gpg --verify" output.

If the previous resemblance wasn't actually by design, I have no concerns about your modification and this is just FYI in case the omission was interpreted as an unintentional grammar issue.

As a potential additional improvement on my original patch I suspect that it might make sense to check sig->timestamp for 0 and use something like "no timestamp set" instead of an most-likely incorrect date.

I believe the timestamp packet is technically not required by the OpenPGP RFCs, but so far I haven't seen a real world message where it doesn't exist and I'm not too familiar with the gpgme internals.
Comment 3 Ricardo Mones 2013-04-16 10:36:33 UTC
I noticed you leave the " on " out to match gpg output, but since the output in Claws Mail is just for user info I think is better to write correct English when is possible ;)

Regarding the timestamp == 0, I did investigate that a bit too, but was unable to found how to generate a signed message without timestamp or with zero timestamp. So, even if the packet is not required, I don't think that will be an issue.
If anybody finds how to, let us know (yeah, I'm curious :)