diff options
author | Werner Koch <wk@gnupg.org> | 1998-03-03 09:43:28 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1998-03-03 09:43:28 +0100 |
commit | 0eb5aa6cfd145ececede8e5c6ed34f8bc9674830 (patch) | |
tree | e43b97086562b6414382b045d0221e25b243a43a /g10/g10.c | |
parent | bug fixes (diff) | |
download | gnupg2-0eb5aa6cfd145ececede8e5c6ed34f8bc9674830.tar.xz gnupg2-0eb5aa6cfd145ececede8e5c6ed34f8bc9674830.zip |
v0.2.11
Diffstat (limited to 'g10/g10.c')
-rw-r--r-- | g10/g10.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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]")); |