1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

gpg: New command --quick-set-ownertrust.

* g10/gpg.c (aQuickSetOwnertrust): New.
(opts): Add new command.
(main): Implement it.
* g10/keyedit.c (keyedit_quick_set_ownertrust): New.
This commit is contained in:
Werner Koch 2024-04-17 11:42:20 +02:00
parent 2a71c3cf97
commit 21f7ad563d
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
4 changed files with 105 additions and 2 deletions

View file

@ -136,6 +136,7 @@ enum cmd_and_opt_values
aQuickSetExpire,
aQuickSetPrimaryUid,
aQuickUpdatePref,
aQuickSetOwnertrust,
aListConfig,
aListGcryptConfig,
aGPGConfList,
@ -504,6 +505,7 @@ static gpgrt_opt_t opts[] = {
N_("quickly set a new expiration date")),
ARGPARSE_c (aQuickSetPrimaryUid, "quick-set-primary-uid", "@"),
ARGPARSE_c (aQuickUpdatePref, "quick-update-pref", "@"),
ARGPARSE_c (aQuickSetOwnertrust, "quick-set-ownertrust", "@"),
ARGPARSE_c (aFullKeygen, "full-generate-key" ,
N_("full featured key pair generation")),
ARGPARSE_c (aFullKeygen, "full-gen-key", "@"),
@ -2722,6 +2724,7 @@ main (int argc, char **argv)
case aQuickSetExpire:
case aQuickSetPrimaryUid:
case aQuickUpdatePref:
case aQuickSetOwnertrust:
case aExportOwnerTrust:
case aImportOwnerTrust:
case aRebuildKeydbCaches:
@ -4405,6 +4408,7 @@ main (int argc, char **argv)
case aQuickRevUid:
case aQuickSetPrimaryUid:
case aQuickUpdatePref:
case aQuickSetOwnertrust:
case aFullKeygen:
case aKeygen:
case aImport:
@ -4926,6 +4930,15 @@ main (int argc, char **argv)
}
break;
case aQuickSetOwnertrust:
{
if (argc != 2)
wrong_args ("--quick-set-ownertrust USER-ID"
" [enable|disable|full|...]");
keyedit_quick_set_ownertrust (ctrl, argv[0], argv[1]);
}
break;
case aFastImport:
opt.import_options |= IMPORT_FAST; /* fall through */
case aImport: