aboutsummaryrefslogtreecommitdiffstats
path: root/agent/protect-tool.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2025-11-16 16:49:52 +0000
committerWerner Koch <[email protected]>2025-11-16 16:57:14 +0000
commit47bab26daf035ffdce97e4957bdb6ad12dbea506 (patch)
treeefb6029844d8de1169d206730cee85af50fb2760 /agent/protect-tool.c
parentgpg: Change the mode1003 format for composite keys. (diff)
downloadgnupg-47bab26daf035ffdce97e4957bdb6ad12dbea506.tar.gz
gnupg-47bab26daf035ffdce97e4957bdb6ad12dbea506.zip
gpg: Allow the import of Kyber secret keys.
* g10/import.c (transfer_secret_keys): Handle mode 1003. * g10/call-agent.c (agent_import_key): Add arg mode1003. * common/sexputil.c (make_canon_sexp): Create in secmem when the input was in secmem. * agent/findkey.c (agent_write_private_key): Add arg 'linkattr' and change all callers. * agent/command.c (cmd_import_key): Add option '--mode1003'. Reorganize code and implement support for composite keys. -- GnuPG-bug-id: 7315
Diffstat (limited to 'agent/protect-tool.c')
-rw-r--r--agent/protect-tool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/agent/protect-tool.c b/agent/protect-tool.c
index c6450a20e..40e9aed76 100644
--- a/agent/protect-tool.c
+++ b/agent/protect-tool.c
@@ -818,7 +818,8 @@ gpg_error_t
agent_write_private_key (ctrl_t ctrl, const unsigned char *grip,
const void *buffer, size_t length, int force,
const char *serialno, const char *keyref,
- const char *dispserialno, time_t timestamp)
+ const char *dispserialno, time_t timestamp,
+ const char *linkattr)
{
char hexgrip[40+4+1];
char *p;
@@ -829,6 +830,7 @@ agent_write_private_key (ctrl_t ctrl, const unsigned char *grip,
(void)keyref;
(void)timestamp;
(void)dispserialno;
+ (void)linkattr;
bin2hex (grip, 20, hexgrip);
strcpy (hexgrip+40, ".key");