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/protect-tool.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/protect-tool.c')
-rw-r--r-- | agent/protect-tool.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/agent/protect-tool.c b/agent/protect-tool.c index 87cf36814..17f6fd559 100644 --- a/agent/protect-tool.c +++ b/agent/protect-tool.c @@ -813,11 +813,11 @@ agent_askpin (ctrl_t ctrl, /* Replacement for the function in findkey.c. Here we write the key * to stdout. */ -int +gpg_error_t agent_write_private_key (const unsigned char *grip, const void *buffer, size_t length, int force, const char *serialno, const char *keyref, - time_t timestamp) + const char *dispserialno, time_t timestamp) { char hexgrip[40+4+1]; char *p; @@ -826,6 +826,7 @@ agent_write_private_key (const unsigned char *grip, (void)serialno; (void)keyref; (void)timestamp; + (void)dispserialno; bin2hex (grip, 20, hexgrip); strcpy (hexgrip+40, ".key"); |