1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

dirmngr: New option --debug-cache-expired-certs.

* dirmngr/dirmngr.h (opt): Add debug_cache_expired_certs:
* dirmngr/dirmngr.c (oDebugCacheExpiredCerts): New.
(opts): Add option.
(parse_rereadable_options): Set option.
* dirmngr/certcache.c (put_cert): Handle the option.
This commit is contained in:
Werner Koch 2022-08-31 18:11:36 +02:00
parent 0662b9444b
commit 17073c9abc
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 14 additions and 3 deletions

View file

@ -271,8 +271,9 @@ put_cert (ksba_cert_t cert, int permanent, unsigned int trustclass,
cert_item_t ci;
fingerprint_list_t ignored;
if (permanent)
{ /* Do a little validation. */
/* Do not keep expired certificates in the permanent cache. */
if (permanent && !opt.debug_cache_expired_certs)
{
ksba_isotime_t not_after;
ksba_isotime_t current_time;