mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: New option --quick-update-pref.
* g10/gpg.c (aQuickUpdatePref): New.
(opts): Add --quick-update-pref.
(main): Implement.
* g10/keyedit.c (keyedit_quick_update_pref): New.
(menu_set_preferences): Add arg 'unattended' and adjust caller.
--
This new quick command is in particular useful to update existing keys
so that they can be used with OCB mode.
(cherry picked from commit d40d23b233
)
This commit is contained in:
parent
b6ba7054a0
commit
f16c946be7
5 changed files with 76 additions and 10 deletions
14
g10/gpg.c
14
g10/gpg.c
|
@ -1,7 +1,7 @@
|
|||
/* gpg.c - The GnuPG utility (main for gpg)
|
||||
* Copyright (C) 1998-2020 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1997-2019 Werner Koch
|
||||
* Copyright (C) 2015-2021 g10 Code GmbH
|
||||
* Copyright (C) 2015-2022 g10 Code GmbH
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
|
@ -128,6 +128,7 @@ enum cmd_and_opt_values
|
|||
aQuickRevUid,
|
||||
aQuickSetExpire,
|
||||
aQuickSetPrimaryUid,
|
||||
aQuickUpdatePref,
|
||||
aListConfig,
|
||||
aListGcryptConfig,
|
||||
aGPGConfList,
|
||||
|
@ -480,6 +481,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||
ARGPARSE_c (aQuickSetExpire, "quick-set-expire",
|
||||
N_("quickly set a new expiration date")),
|
||||
ARGPARSE_c (aQuickSetPrimaryUid, "quick-set-primary-uid", "@"),
|
||||
ARGPARSE_c (aQuickUpdatePref, "quick-update-pref", "@"),
|
||||
ARGPARSE_c (aFullKeygen, "full-generate-key" ,
|
||||
N_("full featured key pair generation")),
|
||||
ARGPARSE_c (aFullKeygen, "full-gen-key", "@"),
|
||||
|
@ -2625,6 +2627,7 @@ main (int argc, char **argv)
|
|||
case aQuickRevUid:
|
||||
case aQuickSetExpire:
|
||||
case aQuickSetPrimaryUid:
|
||||
case aQuickUpdatePref:
|
||||
case aExportOwnerTrust:
|
||||
case aImportOwnerTrust:
|
||||
case aRebuildKeydbCaches:
|
||||
|
@ -4185,6 +4188,7 @@ main (int argc, char **argv)
|
|||
case aQuickAddKey:
|
||||
case aQuickRevUid:
|
||||
case aQuickSetPrimaryUid:
|
||||
case aQuickUpdatePref:
|
||||
case aFullKeygen:
|
||||
case aKeygen:
|
||||
case aImport:
|
||||
|
@ -4685,6 +4689,14 @@ main (int argc, char **argv)
|
|||
}
|
||||
break;
|
||||
|
||||
case aQuickUpdatePref:
|
||||
{
|
||||
if (argc != 1)
|
||||
wrong_args ("--quick-update-pref USER-ID");
|
||||
keyedit_quick_update_pref (ctrl, *argv);
|
||||
}
|
||||
break;
|
||||
|
||||
case aFastImport:
|
||||
opt.import_options |= IMPORT_FAST; /* fall through */
|
||||
case aImport:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue