summaryrefslogtreecommitdiffstats
path: root/g10/call-agent.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-08-19 13:43:16 +0200
committerWerner Koch <wk@gnupg.org>2020-08-19 13:43:16 +0200
commit4031c42bfd0135874a5b362df175de93a19f1b51 (patch)
treea339aa48a270d358f7264b5bb36e64a326d427f3 /g10/call-agent.h
parentgpg: Fix condition of string_to_aead_algo. (diff)
downloadgnupg2-4031c42bfd0135874a5b362df175de93a19f1b51.tar.xz
gnupg2-4031c42bfd0135874a5b362df175de93a19f1b51.zip
gpg,gpgsm: Record the creation time of a private key.
* sm/call-agent.c (gpgsm_agent_genkey): Pass --timestamp option. (gpgsm_agent_import_key): Ditto. * g10/call-agent.c (agent_genkey): Add arg timestamp and pass it on. (agent_import_key): Ditto. * g10/import.c (transfer_secret_keys): Pass the creation date to the agent. * g10/keygen.c (common_gen): Ditto. -- Having the creation time in the private key file makes it a lot easier to re-create an OpenPGP public keyblock in case it was accidentally lost. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/call-agent.h')
-rw-r--r--g10/call-agent.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/g10/call-agent.h b/g10/call-agent.h
index 2305f33e0..8f929be27 100644
--- a/g10/call-agent.h
+++ b/g10/call-agent.h
@@ -190,7 +190,7 @@ gpg_error_t agent_get_keyinfo (ctrl_t ctrl, const char *hexkeygrip,
gpg_error_t agent_genkey (ctrl_t ctrl,
char **cache_nonce_addr, char **passwd_nonce_addr,
const char *keyparms, int no_protection,
- const char *passphrase,
+ const char *passphrase, time_t timestamp,
gcry_sexp_t *r_pubkey);
/* Read a public key. FROMCARD may be 0, 1, or 2. */
@@ -220,7 +220,8 @@ gpg_error_t agent_keywrap_key (ctrl_t ctrl, int forexport,
gpg_error_t agent_import_key (ctrl_t ctrl, const char *desc,
char **cache_nonce_addr, const void *key,
size_t keylen, int unattended, int force,
- u32 *keyid, u32 *mainkeyid, int pubkey_algo);
+ u32 *keyid, u32 *mainkeyid, int pubkey_algo,
+ u32 timestamp);
/* Receive a key from the agent. */
gpg_error_t agent_export_key (ctrl_t ctrl, const char *keygrip,