1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

card: Update card info after "generate".

* tools/gpg-card.c (cmd_generate): Re-read the card on success.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2020-05-27 13:48:20 +02:00
parent 2149676122
commit 94d31660c6
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -2387,6 +2387,7 @@ cmd_generate (card_info_t info, char *argstr)
log_printf (" %s%s",
valid_algos[i], valid_algos[i+1]?",":".");
}
log_printf ("\n");
show_keysize_warning ();
goto leave;
}
@ -2436,6 +2437,13 @@ cmd_generate (card_info_t info, char *argstr)
else
err = generate_key (info, keyref, opt_force, opt_algo? opt_algo[0]:NULL);
if (!err)
{
err = scd_learn (info);
if (err)
log_error ("Error re-reading card: %s\n", gpg_strerror (err));
}
leave:
xfree (opt_algo);
xfree (keyref_buffer);