summaryrefslogtreecommitdiffstats
path: root/agent/command-ssh.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-08-17 14:21:00 +0200
committerWerner Koch <wk@gnupg.org>2020-08-17 15:05:49 +0200
commit0da923a1240ac78d60c92cdd8488c4e405c3243b (patch)
tree106ce6faa60a206478752cb21096cc29b4e90d15 /agent/command-ssh.c
parentAdd --chuid to gpg, gpg-card, and gpg-connect-agent. (diff)
downloadgnupg2-0da923a1240ac78d60c92cdd8488c4e405c3243b.tar.xz
gnupg2-0da923a1240ac78d60c92cdd8488c4e405c3243b.zip
agent: Allow to pass a timestamp to genkey and import.
* agent/command.c (cmd_genkey): Add option --timestamp. (cmd_import_key): Ditto. * agent/genkey.c (store_key): Add arg timestamp and change callers. (agent_genkey): Ditto. * agent/findkey.c (write_extended_private_key): Add args timestamp and new key to write a Created line. (agent_write_private_key): Add arg timestamp. (agent_write_shadow_key): Ditto. agent/protect-tool.c (agent_write_private_key): Ditto as dummy arg. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'agent/command-ssh.c')
-rw-r--r--agent/command-ssh.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/agent/command-ssh.c b/agent/command-ssh.c
index 664bd0d30..9081f6f89 100644
--- a/agent/command-ssh.c
+++ b/agent/command-ssh.c
@@ -3036,8 +3036,10 @@ ssh_identity_register (ctrl_t ctrl, ssh_key_type_spec_t *spec,
if (err)
goto out;
- /* Store this key to our key storage. */
- err = agent_write_private_key (key_grip_raw, buffer, buffer_n, 0, NULL, NULL);
+ /* Store this key to our key storage. We do not store a creation
+ * timestamp because we simply do not know. */
+ err = agent_write_private_key (key_grip_raw, buffer, buffer_n, 0,
+ NULL, NULL, 0);
if (err)
goto out;