diff options
author | Werner Koch <[email protected]> | 2025-07-24 10:30:01 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2025-07-24 10:35:12 +0000 |
commit | caa783329b34c519c6f353e40b1c4cf4ef5d2d6a (patch) | |
tree | aa8ccc8e8f9208ffbe364bbb23c874ef6f1be9fb | |
parent | common: Fix read buffer over-read in uncompress_ecc_q_in_canon_sexp. (diff) | |
download | gnupg-caa783329b34c519c6f353e40b1c4cf4ef5d2d6a.tar.gz gnupg-caa783329b34c519c6f353e40b1c4cf4ef5d2d6a.zip |
gpgsm: Fix caching of the trustlist's flags.
* sm/call-agent.c (istrusted_status_cb): Clear the helper flags.
--
GnuPG-bug-id: 7738
Fixes-commit: 09d4b8f496dd461a21d5ba0297710d683b16def4
which introduced the caching but go the flags wrong. The fallout from
this was that the qualified signature consent was show for non QES
certificates. Other flags are almost always the same and thus no
other harm was done.
Backported-from-master: 67a3020d0f3beed89270f2d004c3da5ee9cbfc63
-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 75ae3f677..8efa392aa 100644 --- a/sm/call-agent.c +++ b/sm/call-agent.c @@ -960,6 +960,9 @@ istrusted_status_cb (void *opaque, const char *line) } else if ((s = has_leading_keyword (line, "TRUSTLISTFPR")) && *s) { + /* We see this only with the "LISTTRUSTED --status" command but + * not with ISTRUSTED. Thus the cache will only be filled by + * the former command. */ istrusted_cache_t ci; ci = xtrymalloc (sizeof *ci + strlen (s)); @@ -973,6 +976,9 @@ istrusted_status_cb (void *opaque, const char *line) ci->next = parm->cache; parm->cache = ci; + /* Also need to clear the parm's flags which will be copied to + * the cache. */ + memset (&parm->flags, 0, sizeof ci->flags); } return 0; } |