From bdf252e76ada0056bec2ee7940255f32552328c5 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 3 May 2019 15:54:54 +0200 Subject: agent: Put Token lines into the key files. * agent/findkey.c (write_extended_private_key): Add args serialno and keyref. Write a Token line if that does not yet exist. (agent_write_private_key): Add args serialno and keyref and change all callers. (agent_write_shadow_key): Skip leading spaces. * agent/keyformat.txt: Improve extended key format docs. -- Noet that the extended key forma is the defaqult in 2.3. This patch is a first step to better handle tokens which carray the same key. Signed-off-by: Werner Koch --- agent/protect.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'agent/protect.c') diff --git a/agent/protect.c b/agent/protect.c index 61fb8f45d..c7fb773e1 100644 --- a/agent/protect.c +++ b/agent/protect.c @@ -1667,7 +1667,8 @@ agent_get_shadow_info (const unsigned char *shadowkey, R_HEXSN and the Id string as a malloced string at R_IDSTR. On error an error code is returned and NULL is stored at the result parameters addresses. If the serial number or the ID string is not - required, NULL may be passed for them. */ + required, NULL may be passed for them. Note that R_PINLEN is + currently not used by any caller. */ gpg_error_t parse_shadow_info (const unsigned char *shadow_info, char **r_hexsn, char **r_idstr, int *r_pinlen) -- cgit v1.2.3