1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

g10: Also mark revoked and expired keys as unusable.

* g10/getkey.c (skip_unusable): Also mark the key as unusable if it
has been revoked or has expired.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>.
This commit is contained in:
Neal H. Walfield 2015-09-16 14:05:03 +02:00
parent 1b601de06a
commit 77c2ad4a81

View File

@ -592,8 +592,12 @@ skip_unusable (void *dummy, u32 * keyid, int uid_no)
pk = keyblock->pkt->pkt.public_key;
/* Is the user ID in question revoked/expired? */
if (uid_no)
/* Is the key revoked or expired? */
if (pk->flags.revoked || pk->has_expired)
unusable = 1;
/* Is the user ID in question revoked or expired? */
if (!unusable && uid_no)
{
KBNODE node;
int uids_seen = 0;