mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
card: Cache the results from gpg and gpgsm.
* tools/card-tool-keys.c (keyblock_cache): New var. (release_keyblock): Factor code out to a new do_release_keyblock. Add a cache. (flush_keyblock_cache): New. (get_matching_keys): Use the cache. * tools/gpg-card-tool.c (cmds): Add command "reset". (interactive_loop): Implement reset. -- Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
833f27a6a7
commit
0107984f9f
3 changed files with 90 additions and 3 deletions
|
@ -312,6 +312,8 @@ main (int argc, char **argv)
|
|||
break;
|
||||
}
|
||||
|
||||
flush_keyblock_cache ();
|
||||
|
||||
if (err)
|
||||
gnupg_status_printf (STATUS_FAILURE, "- %u", err);
|
||||
else if (log_get_errorcount (0))
|
||||
|
@ -2639,6 +2641,7 @@ static struct
|
|||
{ "passwd" , cmdPASSWD, 0, N_("menu to change or unblock the PIN")},
|
||||
{ "verify" , cmdVERIFY, 0, N_("verify the PIN and list all data")},
|
||||
{ "unblock" , cmdUNBLOCK,0, N_("unblock the PIN using a Reset Code")},
|
||||
{ "reset" , cmdRESET, 0, N_("send a reset to the card daemon")},
|
||||
{ "factory-reset", cmdFACTORYRESET, 1, N_("destroy all keys and data")},
|
||||
{ "kdf-setup", cmdKDFSETUP, 1, N_("setup KDF for PIN authentication")},
|
||||
{ "key-attr", cmdKEYATTR, 1, N_("change the key attribute")},
|
||||
|
@ -2834,6 +2837,7 @@ interactive_loop (void)
|
|||
"Send a RESET to the card daemon.", 0);
|
||||
else
|
||||
{
|
||||
flush_keyblock_cache ();
|
||||
err = scd_apdu (NULL, NULL);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue