1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

* main.h, g10.c (main), card-util.c (change_pin): If "admin" has not been

issued, skip right to the CHV1/CHV2 PIN change.  No need to show the
unblock or admin PIN change option. (card_edit): Add "admin" command to
add admin commands to the menu.  Do not allow admin commands until "admin"
is given.

* app-openpgp.c (verify_chv3): Show a countdown of how many wrong admin
PINs can be entered before the card is locked.

* options.h, g10.c (main), app-openpgp.c (verify_chv3): Remove
--allow-admin.
This commit is contained in:
David Shaw 2004-09-25 13:04:55 +00:00
parent 4d26ab92cc
commit 2ff6607f0d
6 changed files with 143 additions and 94 deletions

View file

@ -348,8 +348,6 @@ enum cmd_and_opt_values
octapiDriver,
opcscDriver,
oDisableCCID,
oAllowAdmin,
oDenyAdmin,
aTest
};
@ -534,10 +532,6 @@ static ARGPARSE_OPTS opts[] = {
{ oSetNotation, "notation-data", 2, "@" }, /* Alias */
{ oSigNotation, "sig-notation", 2, "@" },
{ oCertNotation, "cert-notation", 2, "@" },
#ifdef ENABLE_CARD_SUPPORT
{ oAllowAdmin, "allow-admin",0,N_("allow the use of admin card commands")},
{ oDenyAdmin, "deny-admin",0,"@"},
#endif
{ 302, NULL, 0, N_(
"@\n(See the man page for a complete listing of all commands and options)\n"
@ -1863,8 +1857,6 @@ main( int argc, char **argv )
case octapiDriver: opt.ctapi_driver = pargs.r.ret_str; break;
case opcscDriver: opt.pcsc_driver = pargs.r.ret_str; break;
case oDisableCCID: opt.disable_ccid = 1; break;
case oAllowAdmin: opt.allow_admin = 1; break;
case oDenyAdmin: opt.allow_admin = 0; break;
#endif /* ENABLE_CARD_SUPPORT*/
case oArmor: opt.armor = 1; opt.no_armor=0; break;
@ -3473,9 +3465,9 @@ main( int argc, char **argv )
case aChangePIN:
if (!argc)
change_pin (0);
change_pin (0,1);
else if (argc == 1)
change_pin ( atoi (*argv));
change_pin (atoi (*argv),1);
else
wrong_args ("--change-pin [no]");
break;