mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
g10: Implement gpg --quick-revuid
* g10/revoke.c (get_default_uid_revocation_reason): New. * g10/keyedit.c (menu_revuid): Break out creation of uid revocation into new function core_revuid. * g10/keyedit.c (keyedit_quick_revuid): New. Selects key and uid, invokes core_revuid. * g10/gpg.c (main): Handle --quick-revuid argument. * doc/gpg.texi: Document --quick-revuid. -- This functionality is a counterpart to --quick-adduid, and will be useful for projects that depend programmatically on gpg to revoke user IDs (one such example is "monkeysphere-host revoke-servicename"). Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> - Minor re-indentation work. - Changed a "0 == memcmp" to "!memcmp" - Removed tests/openpgp/quick-key-manipulation.test from the Makefile. This test needs to be converted to gpgscm. - Removed example from whats-new-in-2.1.txt because that is generated. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
5d6c83deaa
commit
55d112eeb0
6 changed files with 315 additions and 65 deletions
17
g10/gpg.c
17
g10/gpg.c
|
@ -118,6 +118,7 @@ enum cmd_and_opt_values
|
|||
aQuickLSignKey,
|
||||
aQuickAddUid,
|
||||
aQuickAddKey,
|
||||
aQuickRevUid,
|
||||
aListConfig,
|
||||
aListGcryptConfig,
|
||||
aGPGConfList,
|
||||
|
@ -431,6 +432,8 @@ static ARGPARSE_OPTS opts[] = {
|
|||
ARGPARSE_c (aQuickAddUid, "quick-adduid",
|
||||
N_("quickly add a new user-id")),
|
||||
ARGPARSE_c (aQuickAddKey, "quick-addkey", "@"),
|
||||
ARGPARSE_c (aQuickRevUid, "quick-revuid",
|
||||
N_("quickly revoke a user-id")),
|
||||
ARGPARSE_c (aFullKeygen, "full-gen-key" ,
|
||||
N_("full featured key pair generation")),
|
||||
ARGPARSE_c (aGenRevoke, "gen-revoke",N_("generate a revocation certificate")),
|
||||
|
@ -2434,6 +2437,7 @@ main (int argc, char **argv)
|
|||
case aQuickKeygen:
|
||||
case aQuickAddUid:
|
||||
case aQuickAddKey:
|
||||
case aQuickRevUid:
|
||||
case aExportOwnerTrust:
|
||||
case aImportOwnerTrust:
|
||||
case aRebuildKeydbCaches:
|
||||
|
@ -3785,6 +3789,7 @@ main (int argc, char **argv)
|
|||
case aQuickKeygen:
|
||||
case aQuickAddUid:
|
||||
case aQuickAddKey:
|
||||
case aQuickRevUid:
|
||||
case aFullKeygen:
|
||||
case aKeygen:
|
||||
case aImport:
|
||||
|
@ -4204,6 +4209,18 @@ main (int argc, char **argv)
|
|||
}
|
||||
break;
|
||||
|
||||
case aQuickRevUid:
|
||||
{
|
||||
const char *uid, *uidtorev;
|
||||
|
||||
if (argc != 2)
|
||||
wrong_args ("--quick-revuid USER-ID USER-ID-TO-REVOKE");
|
||||
uid = *argv++; argc--;
|
||||
uidtorev = *argv++; argc--;
|
||||
keyedit_quick_revuid (ctrl, uid, uidtorev);
|
||||
}
|
||||
break;
|
||||
|
||||
case aFastImport:
|
||||
opt.import_options |= IMPORT_FAST;
|
||||
case aImport:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue