diff options
author | Werner Koch <[email protected]> | 2024-10-04 10:03:11 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2024-10-04 10:24:00 +0000 |
commit | f8f6c6c7616662a6748d0a9cc19532d48e502d62 (patch) | |
tree | 4d7c549d90275043b9e5104147737084d37cf22a /sm/call-agent.c | |
parent | gpgsm: Implement a cache for the KEYINFO queries. (diff) | |
download | gnupg-f8f6c6c7616662a6748d0a9cc19532d48e502d62.tar.gz gnupg-f8f6c6c7616662a6748d0a9cc19532d48e502d62.zip |
gpgsm: Add compatibility flag no-keyinfo-cache
* sm/gpgsm.c (compatibility_flags): Add flag.
* sm/gpgsm.h (COMPAT_NO_KEYINFO_CACHE): New.
* sm/call-agent.c (gpgsm_agent_istrusted): Act upon it.
(gpgsm_agent_keyinfo): Ditto.
Diffstat (limited to 'sm/call-agent.c')
-rw-r--r-- | sm/call-agent.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sm/call-agent.c b/sm/call-agent.c index a0211fc41..dfaeee61a 100644 --- a/sm/call-agent.c +++ b/sm/call-agent.c @@ -1028,6 +1028,9 @@ gpgsm_agent_istrusted (ctrl_t ctrl, ksba_cert_t cert, const char *hexfpr, } /* First try to get the info from the cache. */ + if ((opt.compat_flags & COMPAT_NO_KEYINFO_CACHE)) + istrusted_cache_disabled = 1; + if (!istrusted_cache_disabled && !istrusted_cache_valid) { /* Cache is empty - fill it. */ @@ -1462,6 +1465,9 @@ gpgsm_agent_keyinfo (ctrl_t ctrl, const char *hexkeygrip, char **r_serialno) return gpg_error (GPG_ERR_INV_VALUE); /* First try to fill the cache. */ + if ((opt.compat_flags & COMPAT_NO_KEYINFO_CACHE)) + keyinfo_cache_disabled = 1; + if (!keyinfo_cache_disabled && !ctrl->keyinfo_cache_valid) { parm.fill_mode = 1; |