summaryrefslogtreecommitdiffstats
path: root/g10/g10.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-03-03 09:43:28 +0100
committerWerner Koch <wk@gnupg.org>1998-03-03 09:43:28 +0100
commit0eb5aa6cfd145ececede8e5c6ed34f8bc9674830 (patch)
treee43b97086562b6414382b045d0221e25b243a43a /g10/g10.c
parentbug fixes (diff)
downloadgnupg2-0eb5aa6cfd145ececede8e5c6ed34f8bc9674830.tar.xz
gnupg2-0eb5aa6cfd145ececede8e5c6ed34f8bc9674830.zip
v0.2.11
Diffstat (limited to 'g10/g10.c')
-rw-r--r--g10/g10.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/g10/g10.c b/g10/g10.c
index 867bb5a43..0fddeedbb 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -120,7 +120,7 @@ static ARGPARSE_OPTS opts[] = {
enum cmd_values { aNull = 0,
aSym, aStore, aEncr, aKeygen, aSign, aSignEncr,
- aSignKey, aClearsign, aListPackets, aEditSig,
+ aSignKey, aClearsign, aListPackets, aEditSig, aDeleteKey,
aKMode, aKModeC, aChangePass, aImport,
aExport, aCheckKeys, aGenRevoke,
aNOP };
@@ -416,6 +416,7 @@ main( int argc, char **argv )
case 501: opt.answer_yes = 1; break;
case 502: opt.answer_no = 1; break;
case 503: set_cmd( &cmd, aKeygen); break;
+ case 505: set_cmd( &cmd, aDeleteKey); break;
case 506: set_cmd( &cmd, aSignKey); break;
case 507: set_cmd( &cmd, aStore); break;
case 508: set_cmd( &cmd, aCheckKeys);
@@ -612,6 +613,14 @@ main( int argc, char **argv )
log_error("%s: edit signature failed: %s\n", fname_print, g10_errstr(rc) );
break;
+ case aDeleteKey:
+ if( argc != 1 )
+ wrong_args(_("--delete-key username"));
+ /* note: fname is the user id! */
+ if( (rc = delete_key(fname)) )
+ log_error("%s: delete key failed: %s\n", fname_print, g10_errstr(rc) );
+ break;
+
case aChangePass: /* Chnage the passphrase */
if( argc > 1 ) /* no arg: use default, 1 arg use this one */
wrong_args(_("--change-passphrase [username]"));