Home GnuPG
Diffusion GnuPG e77f332b01f1

gpg: Fix key expiration and usage for keys created at the Epoch.

Description

gpg: Fix key expiration and usage for keys created at the Epoch.

* g10/getkey.c (merge_selfsigs_main): Take a zero key creation time in
account.

Keys created at the Epoch have a creation time of 0; when figuring out
the latest signature with properties to apply to a key the usual
comparison A > B does not work if A is always 0. We now special case
this for the expiration and usage data.

(cherry picked from commit 161a098be6f9d50fb5f7e120baee81e75d6eb5ad)

  • Co-authored-by: gniibe@fsij.org
  • GnuPG-bug-id: T4670
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Mar 18 2020, 12:30 PM
Parents
rG95b42278cafe: gpg: New option --auto-key-import
Branches
Unknown
Tags
Unknown
Tasks
T4670: Key expiration time ignored for zero creation date keys