mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: New option --debug-ignore-expiration to help with testing.
* g10/gpg.c (oDebugIgnoreExpiration): New. (opts): Add option. (main): Set flag. * g10/options.h (opt): Add field ignore_expiration. * g10/pkclist.c (do_we_trust): Handle the option. * g10/getkey.c (skip_unusable): Ditto. (finish_lookup): Ditto. -- GnuPG-bug-id: 2703
This commit is contained in:
parent
ef2c3d50fa
commit
c30d5829c9
5 changed files with 26 additions and 9 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue