mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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 <wk@gnupg.org>
This commit is contained in:
parent
c9fa28bfad
commit
bdf252e76a
9 changed files with 121 additions and 32 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue