toofishes / python-pgpdump

PGP packet parser library
Other
55 stars 26 forks source link

Signature subpacket type 9 - key expiration time - not parsed #20

Open JackDca opened 6 years ago

JackDca commented 6 years ago

A subkey signature packet can have two expiration times:

It appears that only the type 3 subpacket is parsed and used to calculate the attributes raw_expiration_time and expiration_time and subpacket type 9 is not parsed.

The key expiration time is also important. It would be good to have raw_key_expiration_time and key_expiration_time attributes. But ...

There would be a complication in calculating these in that subpacket 9 encodes the expiry as "number of seconds after key creation time" instead of an actual date, and the key creation time is not stored in the signature packet. To avoid problems (e.g. key creation time can't be found in the subkey packet) it would probably be best to instead expose the subpacket 9 value in an attribute called key_lifetime_s and leave any further calculations to the user.

Would the developers welcome a PR to implement that?

cfcs commented 5 years ago

Mate I don't think this repo is maintained.