aboutsummaryrefslogtreecommitdiffstats
path: root/agent/agent.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-05-26 09:59:46 +0000
committerWerner Koch <[email protected]>2023-05-26 09:59:46 +0000
commit13013ec1c0d308b5d22f176f3850840cbbf21f05 (patch)
treec4758ca5e39b1f5ab3d82917cad82ffee0e43f7d /agent/agent.h
parentcommon: New function nve_set (diff)
downloadgnupg-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/agent.h')
-rw-r--r--agent/agent.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/agent/agent.h b/agent/agent.h
index 4e7452eee..531fad210 100644
--- a/agent/agent.h
+++ b/agent/agent.h
@@ -452,10 +452,12 @@ void start_command_handler_ssh (ctrl_t, gnupg_fd_t);
/*-- findkey.c --*/
gpg_error_t agent_modify_description (const char *in, const char *comment,
const gcry_sexp_t key, char **result);
-int 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);
+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,
+ const char *dispserialno,
+ time_t timestamp);
gpg_error_t agent_key_from_file (ctrl_t ctrl,
const char *cache_nonce,
const char *desc_text,
@@ -587,7 +589,8 @@ gpg_error_t s2k_hash_passphrase (const char *passphrase, int hashalgo,
unsigned char *key, size_t keylen);
gpg_error_t agent_write_shadow_key (const unsigned char *grip,
const char *serialno, const char *keyid,
- const unsigned char *pkbuf, int force);
+ const unsigned char *pkbuf, int force,
+ const char *dispserialno);
/*-- trustlist.c --*/