diff options
author | Werner Koch <[email protected]> | 2014-03-27 15:33:40 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2014-03-27 15:33:40 +0000 |
commit | b6786cc3ec0bb582323adf94c2ee624bcfbeb466 (patch) | |
tree | 993061c71431929bf4a940727e2fb6cc12411a5d /g10/gpg.c | |
parent | Change some keyedit functions to allow printing to arbitrary streams. (diff) | |
download | gnupg-b6786cc3ec0bb582323adf94c2ee624bcfbeb466.tar.gz gnupg-b6786cc3ec0bb582323adf94c2ee624bcfbeb466.zip |
gpg: Add commands --quick-sign-key and --quick-lsign-key.
* g10/gpg.c (main): Add commands --quick-sign-key and
--quick-lsign-key.
* g10/keyedit.c (sign_uids): Add args FP and QUICK.
(keyedit_quick_sign): New.
(show_key_with_all_names): Add arg NOWARN.
Diffstat (limited to 'g10/gpg.c')
-rw-r--r-- | g10/gpg.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -1,6 +1,7 @@ /* gpg.c - The GnuPG utility (main for gpg) * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 * 2008, 2009, 2010, 2011 Free Software Foundation, Inc. + * Copyright (C) 2013, 2014 Werner Koch * * This file is part of GnuPG. * @@ -111,6 +112,8 @@ enum cmd_and_opt_values aSignSym, aSignKey, aLSignKey, + aQuickSignKey, + aQuickLSignKey, aListConfig, aGPGConfList, aGPGConfTest, @@ -408,6 +411,10 @@ static ARGPARSE_OPTS opts[] = { N_("remove keys from the public keyring")), ARGPARSE_c (aDeleteSecretKeys, "delete-secret-keys", N_("remove keys from the secret keyring")), + ARGPARSE_c (aQuickSignKey, "quick-sign-key" , + N_("quickly sign a key")), + ARGPARSE_c (aQuickLSignKey, "quick-lsign-key", + N_("quickly sign a key locally")), ARGPARSE_c (aSignKey, "sign-key" ,N_("sign a key")), ARGPARSE_c (aLSignKey, "lsign-key" ,N_("sign a key locally")), ARGPARSE_c (aEditKey, "edit-key" ,N_("sign or edit a key")), @@ -2264,6 +2271,8 @@ main (int argc, char **argv) case aDeArmor: case aEnArmor: case aSign: + case aQuickSignKey: + case aQuickLSignKey: case aSignKey: case aLSignKey: case aStore: @@ -3735,6 +3744,22 @@ main (int argc, char **argv) } break; + case aQuickSignKey: + case aQuickLSignKey: + { + const char *fpr; + + if (argc < 1) + wrong_args ("--quick-[l]sign-key fingerprint [userids]"); + fpr = *argv++; argc--; + sl = NULL; + for( ; argc; argc--, argv++) + append_to_strlist2 (&sl, *argv, utf8_strings); + keyedit_quick_sign (ctrl, fpr, sl, locusr, (cmd == aQuickLSignKey)); + free_strlist (sl); + } + break; + case aSignKey: if( argc != 1 ) wrong_args(_("--sign-key user-id")); |