diff options
author | Werner Koch <[email protected]> | 2019-05-03 13:54:54 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-05-03 13:54:54 +0000 |
commit | bdf252e76ada0056bec2ee7940255f32552328c5 (patch) | |
tree | cb239466bff0ed49319cb223058af18b6bb88466 /agent/protect-tool.c | |
parent | common: In private key mode write "Key:" always last in name-value. (diff) | |
download | gnupg-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/protect-tool.c')
-rw-r--r-- | agent/protect-tool.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/agent/protect-tool.c b/agent/protect-tool.c index ec7b47695..30d78cd43 100644 --- a/agent/protect-tool.c +++ b/agent/protect-tool.c @@ -799,12 +799,15 @@ agent_askpin (ctrl_t ctrl, * to stdout. */ int agent_write_private_key (const unsigned char *grip, - const void *buffer, size_t length, int force) + const void *buffer, size_t length, int force, + const char *serialno, const char *keyref) { char hexgrip[40+4+1]; char *p; (void)force; + (void)serialno; + (void)keyref; bin2hex (grip, 20, hexgrip); strcpy (hexgrip+40, ".key"); |