diff options
author | Werner Koch <[email protected]> | 2023-05-26 09:59:46 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2023-05-26 09:59:46 +0000 |
commit | 13013ec1c0d308b5d22f176f3850840cbbf21f05 (patch) | |
tree | c4758ca5e39b1f5ab3d82917cad82ffee0e43f7d /agent/pksign.c | |
parent | common: New function nve_set (diff) | |
download | gnupg-13013ec1c0d308b5d22f176f3850840cbbf21f05.tar.gz gnupg-13013ec1c0d308b5d22f176f3850840cbbf21f05.zip |
agent: Create and use Token entries to track the display s/n.
* agent/findkey.c (agent_write_private_key): Add arg dispserialno and
update the token.
(agent_write_shadow_key): Add arg dispserialno and adjust all callers.
--
GnuPG-bug-id: 6135
Note that this has been forward ported from 2.2
Diffstat (limited to 'agent/pksign.c')
-rw-r--r-- | agent/pksign.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/agent/pksign.c b/agent/pksign.c index dfed0e398..a7b5c579f 100644 --- a/agent/pksign.c +++ b/agent/pksign.c @@ -372,8 +372,15 @@ agent_pksign_do (ctrl_t ctrl, const char *cache_nonce, } if (keyref) - agent_write_shadow_key (ctrl->keygrip, serialno, keyref, pkbuf, 0); + { + char *dispserialno; + agent_card_getattr (ctrl, "$DISPSERIALNO", &dispserialno, + hexgrip); + agent_write_shadow_key (ctrl->keygrip, serialno, keyref, pkbuf, + 0, dispserialno); + xfree (dispserialno); + } algo = get_pk_algo_from_key (s_pkey); xfree (serialno); |