diff options
author | Werner Koch <[email protected]> | 2016-12-05 09:58:39 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-12-05 10:00:11 +0000 |
commit | 41b3d0975de65d1654f5e37c626d7c9b7c9a7a4d (patch) | |
tree | a097a86bcb7aaa4c149ef429bf1ad597fed61c7d /g10/gpg.c | |
parent | tests: New test for '--enarmor' and '--dearmor'. (diff) | |
download | gnupg-41b3d0975de65d1654f5e37c626d7c9b7c9a7a4d.tar.gz gnupg-41b3d0975de65d1654f5e37c626d7c9b7c9a7a4d.zip |
gpg: New option --quick-set-expire.
* g10/gpg.c (aQuickSetExpire): New.
(opts): New option --quick-set-expire.
(main): Implement option.
* g10/keyedit.c (menu_expire): Add args FORCE_MAINKEY and
NEWEXPIRATION. Change semantics of the return value. Change caller.
(keyedit_quick_set_expire): New.
--
This patch partly solves
GnuPG-bug-id: 2701
Diffstat (limited to 'g10/gpg.c')
-rw-r--r-- | g10/gpg.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -123,6 +123,7 @@ enum cmd_and_opt_values aQuickAddUid, aQuickAddKey, aQuickRevUid, + aQuickSetExpire, aListConfig, aListGcryptConfig, aGPGConfList, @@ -448,6 +449,8 @@ static ARGPARSE_OPTS opts[] = { ARGPARSE_c (aQuickAddKey, "quick-addkey", "@"), ARGPARSE_c (aQuickRevUid, "quick-revuid", N_("quickly revoke a user-id")), + ARGPARSE_c (aQuickSetExpire, "quick-set-expire", + N_("quickly set a new expiration date")), ARGPARSE_c (aFullKeygen, "full-gen-key" , N_("full featured key pair generation")), ARGPARSE_c (aGenRevoke, "gen-revoke",N_("generate a revocation certificate")), @@ -2549,6 +2552,7 @@ main (int argc, char **argv) case aQuickAddUid: case aQuickAddKey: case aQuickRevUid: + case aQuickSetExpire: case aExportOwnerTrust: case aImportOwnerTrust: case aRebuildKeydbCaches: @@ -4384,6 +4388,18 @@ main (int argc, char **argv) } break; + case aQuickSetExpire: + { + const char *x_fpr, *x_expire; + + if (argc != 2) + wrong_args ("--quick-set-exipre FINGERPRINT EXPIRE"); + x_fpr = *argv++; argc--; + x_expire = *argv++; argc--; + keyedit_quick_set_expire (ctrl, x_fpr, x_expire); + } + break; + case aFastImport: opt.import_options |= IMPORT_FAST; case aImport: |