diff options
author | NIIBE Yutaka <[email protected]> | 2023-05-11 09:51:33 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2023-05-11 09:51:33 +0000 |
commit | 3274893224d6ef9ae2480ae724243d5574273b38 (patch) | |
tree | 42c3b5a0f2deb53690477e555be04be1cec4be4e /g10/getkey.c | |
parent | dirmngr: Remove casting which is not needed any more. (diff) | |
parent | Prepare new development cycle (diff) | |
download | gnupg-gniibe/t6275.tar.gz gnupg-gniibe/t6275.zip |
Merge branch 'master' into gniibe/t6275gniibe/t6275
Diffstat (limited to 'g10/getkey.c')
-rw-r--r-- | g10/getkey.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/g10/getkey.c b/g10/getkey.c index 1b37c597d..15905dc63 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -685,7 +685,7 @@ skip_unusable (void *opaque, u32 * keyid, int uid_no) pk = keyblock->pkt->pkt.public_key; /* Is the key revoked or expired? */ - if (pk->flags.revoked || pk->has_expired) + if (pk->flags.revoked || (pk->has_expired && !opt.ignore_expiration)) unusable = 1; /* Is the user ID in question revoked or expired? */ @@ -704,7 +704,8 @@ skip_unusable (void *opaque, u32 * keyid, int uid_no) if (uids_seen != uid_no) continue; - if (user_id->flags.revoked || user_id->flags.expired) + if (user_id->flags.revoked + || (user_id->flags.expired && !opt.ignore_expiration)) unusable = 1; break; @@ -3736,7 +3737,7 @@ finish_lookup (kbnode_t keyblock, unsigned int req_usage, int want_exact, n_revoked_or_expired++; continue; } - if (pk->has_expired) + if (pk->has_expired && !opt.ignore_expiration) { if (DBG_LOOKUP) log_debug ("\tsubkey has expired\n"); |