[#6601] Incorrect PGP expiration date shown
Summary Incorrect PGP expiration date shown
Queue Horde Framework Packages
Queue Version HEAD
Type Bug
State Assigned
Priority 1. Low
Owners Matt Selsky <selsky (at) columbia (dot) edu>
Requester Matt Selsky <selsky (at) columbia (dot) edu>
Created 04/12/2008 (84 days ago)
Due
Updated 06/13/2008 (22 days ago)
Assigned 06/13/2008 (22 days ago)
Resolved
Attachments 0xF3C01D42.asc Download
Milestone
Patch No

History
06/13/2008 Chuck Hagenbuch State ⇒ Assigned
Assigned to Matt Selsky
 
04/26/2008 Chuck Hagenbuch Comment #4 Reply to this comment
Added a test that should be merged when this is fixed, too.
04/14/2008 Chuck Hagenbuch Comment #3
State ⇒ Feedback
Reply to this comment
This commit:
http://lists.horde.org/archives/cvs/Week-of-Mon-20080414/077361.html

adds parsing of expiration dates out of the --list-packets output. 
However, it gets set way down in the sig_* array, and isn't reflected 
in the pgpPrettyKey() output. I'm not really clear what the right way 
to do this is, though. Help?
04/12/2008 Matt Selsky Comment #2 Reply to this comment
And

$ gpg --list-keys address@example.com
pub   1024D/F3C01D42 2008-04-11 [expires: 2013-04-10]
uid                  John Smith <address@example.com>
sub   2048g/AF52BF66 2008-04-11 [expires: 2013-04-10]

04/12/2008 Matt Selsky Comment #1
New Attachment: 0xF3C01D42.asc Download
Patch ⇒
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Incorrect PGP expiration date shown
Type ⇒ Bug
Priority ⇒ 1. Low
State ⇒
Reply to this comment
I was sent the attached PGP public key.

IMP shows:

Name:             John Smith
Key Type:         Public Key
Key Creation:     04/11/08
Expiration Date:  [Never]
Key Length:       1024 Bytes
Comment:          [None]
E-Mail:           address@example.com
Hash-Algorithm:   pgp-sha1
Key ID:           0xF3C01D42
Key Fingerprint:  5912 D91D 4C79 C670 1FFF  1486 04A6 7B37 F3C0 1D42


The expiration date should be "04/11/13", aka 5 years.

gpg --list-packets shows:

:public key packet:
        version 4, algo 17, created 1207935691, expires 0
        pkey[0]: [1024 bits]
        pkey[1]: [160 bits]
        pkey[2]: [1018 bits]
        pkey[3]: [1023 bits]
:user ID packet: "John Smith <address@example.com>"
:signature packet: algo 17, keyid 04A67B37F3C01D42
        version 4, created 1207935691, md5len 0, sigclass 0x13
        digest algo 2, begin of digest b6 e5
        hashed subpkt 2 len 4 (sig created 2008-04-11)
        hashed subpkt 27 len 1 (key flags: 23)
        hashed subpkt 9 len 4 (key expires after 5y0d0h0m)
        hashed subpkt 11 len 5 (pref-sym-algos: 9 8 7 3 2)
        hashed subpkt 21 len 3 (pref-hash-algos: 2 8 3)
        hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
        hashed subpkt 30 len 1 (features: 01)
        hashed subpkt 23 len 1 (key server preferences: 80)
        subpkt 16 len 8 (issuer key ID 04A67B37F3C01D42)
        data: [160 bits]
        data: [157 bits]
:public sub key packet:
        version 4, algo 16, created 1207935691, expires 0
        pkey[0]: [2048 bits]
        pkey[1]: [3 bits]
        pkey[2]: [2048 bits]
:signature packet: algo 17, keyid 04A67B37F3C01D42
        version 4, created 1207935691, md5len 0, sigclass 0x18
        digest algo 2, begin of digest a4 15
        hashed subpkt 2 len 4 (sig created 2008-04-11)
        hashed subpkt 27 len 1 (key flags: 0C)
        hashed subpkt 9 len 4 (key expires after 5y0d0h0m)
        subpkt 16 len 8 (issuer key ID 04A67B37F3C01D42)
        data: [160 bits]
        data: [158 bits]