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:
parent
2149676122
commit
94d31660c6
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user