diff options
| author | Werner Koch <[email protected]> | 2020-10-28 16:06:27 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2020-10-28 16:06:27 +0000 |
| commit | 243f9176e799b2328f2e5bed93099bfc474fdc5a (patch) | |
| tree | 3e2d0ca22cba6bd17e0e15d12f041ff17450ea3a /g10/gpg.c | |
| parent | gpg: Sort the signatures in standard key listings. (diff) | |
| download | gnupg-243f9176e799b2328f2e5bed93099bfc474fdc5a.tar.gz gnupg-243f9176e799b2328f2e5bed93099bfc474fdc5a.zip | |
gpg: New command --quick-revoke-sig
* g10/gpg.c (enum cmd_and_opt_values): Add aQuickRevSig.
(opts): Add --quick-revoke-sig.
(main): Implement.
* g10/keyedit.c (quick_find_keyblock): Add arg 'want_secret' and
adjust all callers.
(keyedit_quick_revsig): new.
* g10/revoke.c (get_default_sig_revocation_reason): New.
* g10/keylist.c (cmp_signodes): Make global.
--
GnuPG-bug-id: 5093
Diffstat (limited to 'g10/gpg.c')
| -rw-r--r-- | g10/gpg.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -129,6 +129,7 @@ enum cmd_and_opt_values aLSignKey, aQuickSignKey, aQuickLSignKey, + aQuickRevSig, aQuickAddUid, aQuickAddKey, aQuickRevUid, @@ -499,6 +500,8 @@ static gpgrt_opt_t opts[] = { N_("quickly sign a key")), ARGPARSE_c (aQuickLSignKey, "quick-lsign-key", N_("quickly sign a key locally")), + ARGPARSE_c (aQuickRevSig, "quick-revoke-sig" , + N_("quickly revoke a key signature")), ARGPARSE_c (aSignKey, "sign-key" ,N_("sign a key")), ARGPARSE_c (aLSignKey, "lsign-key" ,N_("sign a key locally")), ARGPARSE_c (aEditKey, "edit-key" ,N_("sign or edit a key")), @@ -2631,6 +2634,7 @@ main (int argc, char **argv) case aSign: case aQuickSignKey: case aQuickLSignKey: + case aQuickRevSig: case aSignKey: case aLSignKey: case aStore: @@ -4446,6 +4450,22 @@ main (int argc, char **argv) } break; + case aQuickRevSig: + { + const char *userid, *siguserid; + + if (argc < 2) + wrong_args ("--quick-revoke-sig USER-ID SIG-USER-ID [userids]"); + userid = *argv++; argc--; + siguserid = *argv++; argc--; + sl = NULL; + for( ; argc; argc--, argv++) + append_to_strlist2 (&sl, *argv, utf8_strings); + keyedit_quick_revsig (ctrl, userid, siguserid, sl); + free_strlist (sl); + } + break; + case aSignKey: if( argc != 1 ) wrong_args("--sign-key user-id"); |
