summaryrefslogtreecommitdiffstats
path: root/g10/g10.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2003-07-23 09:11:06 +0200
committerWerner Koch <wk@gnupg.org>2003-07-23 09:11:06 +0200
commit44f4303bcfe1ce47717c57838d13ebd872fde0fd (patch)
treed72ec3213d44cb3e6d50df31fd1b3a279da1363e /g10/g10.c
parent* export.c (parse_export_options): New option sexp-format. (diff)
downloadgnupg2-44f4303bcfe1ce47717c57838d13ebd872fde0fd.tar.xz
gnupg2-44f4303bcfe1ce47717c57838d13ebd872fde0fd.zip
* keygen.c (generate_keypair): Create an AUTHKEYTYPE entry for cards.
(do_generate_keypair): Abd generate the authkey. (check_smartcard): Changed menu accordingly.
Diffstat (limited to 'g10/g10.c')
-rw-r--r--g10/g10.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/g10/g10.c b/g10/g10.c
index d48dada5e..b7ad9d746 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -128,6 +128,7 @@ enum cmd_and_opt_values { aNull = 0,
aPipeMode,
aRebuildKeydbCaches,
aRefreshKeys,
+ aChangePIN,
oTextmode,
oNoTextmode,
@@ -362,6 +363,8 @@ static ARGPARSE_OPTS opts[] = {
{ aExportSecretSub, "export-secret-subkeys" , 256, "@" },
{ aImport, "import", 256 , N_("import/merge keys")},
{ aFastImport, "fast-import", 256 , "@"},
+ { aChangePIN, "change-pin", 256, N_("change a card's PIN")},
+
{ aListPackets, "list-packets",256,N_("list only the sequence of packets")},
{ aExportOwnerTrust,
"export-ownertrust", 256, N_("export the ownertrust values")},
@@ -1441,6 +1444,8 @@ main( int argc, char **argv )
case aPipeMode: set_cmd( &cmd, aPipeMode); break;
case aRebuildKeydbCaches: set_cmd( &cmd, aRebuildKeydbCaches); break;
+ case aChangePIN: set_cmd (&cmd, aChangePIN); break;
+
case oArmor: opt.armor = 1; opt.no_armor=0; break;
case oOutput: opt.outfile = pargs.r.ret_str; break;
case oQuiet: opt.quiet = 1; break;
@@ -2341,6 +2346,7 @@ main( int argc, char **argv )
case aDeArmor:
case aEnArmor:
case aFixTrustDB:
+ case aChangePIN:
break;
case aExportOwnerTrust: rc = setup_trustdb( 0, trustdb_name ); break;
case aListTrustDB: rc = setup_trustdb( argc? 1:0, trustdb_name ); break;
@@ -2861,6 +2867,15 @@ main( int argc, char **argv )
keydb_rebuild_caches ();
break;
+ case aChangePIN:
+ if (!argc)
+ change_pin (0);
+ else if (argc == 1)
+ change_pin ( atoi (*argv));
+ else
+ wrong_args ("--change-pin [no]");
+ break;
+
case aListPackets:
opt.list_packets=2;
default: