mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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
This commit is contained in:
parent
fae4d06b0c
commit
41b3d0975d
5 changed files with 148 additions and 26 deletions
16
g10/gpg.c
16
g10/gpg.c
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue