aboutsummaryrefslogtreecommitdiffstats
path: root/agent/command.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-05-03 13:54:54 +0000
committerWerner Koch <[email protected]>2019-05-03 13:54:54 +0000
commitbdf252e76ada0056bec2ee7940255f32552328c5 (patch)
treecb239466bff0ed49319cb223058af18b6bb88466 /agent/command.c
parentcommon: In private key mode write "Key:" always last in name-value. (diff)
downloadgnupg-bdf252e76ada0056bec2ee7940255f32552328c5.tar.gz
gnupg-bdf252e76ada0056bec2ee7940255f32552328c5.zip
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 <[email protected]>
Diffstat (limited to 'agent/command.c')
-rw-r--r--agent/command.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/agent/command.c b/agent/command.c
index 082ed4144..9bb6fa306 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -2255,10 +2255,11 @@ cmd_import_key (assuan_context_t ctx, char *line)
err = agent_protect (key, passphrase, &finalkey, &finalkeylen,
ctrl->s2k_count, -1);
if (!err)
- err = agent_write_private_key (grip, finalkey, finalkeylen, force);
+ err = agent_write_private_key (grip, finalkey, finalkeylen, force,
+ NULL, NULL);
}
else
- err = agent_write_private_key (grip, key, realkeylen, force);
+ err = agent_write_private_key (grip, key, realkeylen, force, NULL, NULL);
leave:
gcry_sexp_release (openpgp_sexp);