aboutsummaryrefslogtreecommitdiffstats
path: root/g10/pkclist.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-05-09 06:17:30 +0000
committerWerner Koch <[email protected]>2023-05-09 06:17:30 +0000
commitc30d5829c9ab076e9fd39c223273b065cdb58a0d (patch)
tree9fb413bc2a743cc89a611bf42fc5700c2da7ab72 /g10/pkclist.c
parentgpg: Print a warning if no more encryption subkey was left over. (diff)
downloadgnupg-c30d5829c9ab076e9fd39c223273b065cdb58a0d.tar.gz
gnupg-c30d5829c9ab076e9fd39c223273b065cdb58a0d.zip
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
Diffstat (limited to 'g10/pkclist.c')
-rw-r--r--g10/pkclist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/g10/pkclist.c b/g10/pkclist.c
index 2e8932b9c..42e124e9e 100644
--- a/g10/pkclist.c
+++ b/g10/pkclist.c
@@ -417,7 +417,11 @@ do_we_trust( PKT_public_key *pk, unsigned int trustlevel )
if(trustlevel & TRUST_FLAG_REVOKED
|| trustlevel & TRUST_FLAG_SUB_REVOKED
|| (trustlevel & TRUST_MASK) == TRUST_EXPIRED)
- BUG();
+ {
+ if (opt.ignore_expiration)
+ return 0;
+ BUG ();
+ }
if( opt.trust_model==TM_ALWAYS )
{