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.
This commit is contained in:
parent
811cfa34cb
commit
d40d23b233
5 changed files with 77 additions and 11 deletions
14
g10/gpg.c
14
g10/gpg.c
|
@ -1,7 +1,7 @@
|
|||
/* gpg.c - The GnuPG OpenPGP tool
|
||||
* 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.
|
||||
*
|
||||
|
@ -133,6 +133,7 @@ enum cmd_and_opt_values
|
|||
aQuickRevUid,
|
||||
aQuickSetExpire,
|
||||
aQuickSetPrimaryUid,
|
||||
aQuickUpdatePref,
|
||||
aListConfig,
|
||||
aListGcryptConfig,
|
||||
aGPGConfList,
|
||||
|
@ -489,6 +490,7 @@ static gpgrt_opt_t 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", "@"),
|
||||
|
@ -2677,6 +2679,7 @@ main (int argc, char **argv)
|
|||
case aQuickRevUid:
|
||||
case aQuickSetExpire:
|
||||
case aQuickSetPrimaryUid:
|
||||
case aQuickUpdatePref:
|
||||
case aExportOwnerTrust:
|
||||
case aImportOwnerTrust:
|
||||
case aRebuildKeydbCaches:
|
||||
|
@ -4280,6 +4283,7 @@ main (int argc, char **argv)
|
|||
case aQuickAddKey:
|
||||
case aQuickRevUid:
|
||||
case aQuickSetPrimaryUid:
|
||||
case aQuickUpdatePref:
|
||||
case aFullKeygen:
|
||||
case aKeygen:
|
||||
case aImport:
|
||||
|
@ -4780,6 +4784,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