mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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>
Cherry-picked-from-master: 4031c42bfd
This commit is contained in:
parent
051830d7b4
commit
5ac0cf1b81
5 changed files with 43 additions and 12 deletions
|
@ -2630,7 +2630,8 @@ transfer_secret_keys (ctrl_t ctrl, struct import_stats_s *stats,
|
|||
char *desc = gpg_format_keydesc (ctrl, pk, FORMAT_KEYDESC_IMPORT, 1);
|
||||
err = agent_import_key (ctrl, desc, &cache_nonce,
|
||||
wrappedkey, wrappedkeylen, batch, force,
|
||||
pk->keyid, pk->main_keyid, pk->pubkey_algo);
|
||||
pk->keyid, pk->main_keyid, pk->pubkey_algo,
|
||||
pk->timestamp);
|
||||
xfree (desc);
|
||||
}
|
||||
if (!err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue