diff options
author | Werner Koch <[email protected]> | 2022-11-04 14:26:15 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2022-11-04 14:26:15 +0000 |
commit | d40d23b233f0b2e6fc25937f1632ac5b9d4f61e5 (patch) | |
tree | 58ec5cce323f9b62ebf4c2c5bc52e9dd9f950e04 /g10/gpg.c | |
parent | gpg: New list-options show-pref and show-pref-verbose. (diff) | |
download | gnupg-d40d23b233f0b2e6fc25937f1632ac5b9d4f61e5.tar.gz gnupg-d40d23b233f0b2e6fc25937f1632ac5b9d4f61e5.zip |
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.
Diffstat (limited to 'g10/gpg.c')
-rw-r--r-- | g10/gpg.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -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: |