[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.4-7-g4d3c500
by Werner Koch
cvs at cvs.gnupg.org
Mon Jan 1 15:04:41 CET 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, STABLE-BRANCH-2-2 has been updated
via 4d3c500f4793eb263940ff5ef87ec4ead63c9b4b (commit)
from 412bb7a801f242d47a82712080cce6ddbb843166 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4d3c500f4793eb263940ff5ef87ec4ead63c9b4b
Author: Werner Koch <wk at gnupg.org>
Date: Mon Jan 1 14:59:30 2018 +0100
gpg: Allow "futuredefault" as alias for "future-default".
* g10/keygen.c (parse_key_parameter_string): Allow "futuredefault" and
use case-insensitive matching
(quick_generate_keypair): Ditto.
(parse_algo_usage_expire): Ditto.
--
The man page is sometimes rendered in a way that the hyphen may be
not be considered as part of the string. And while at it we also
allow case-insensitivity.
GnuPG-bug-id: 3655
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/g10/keygen.c b/g10/keygen.c
index a79b4fb..01f3de0 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -3153,9 +3153,10 @@ parse_key_parameter_string (const char *string, int part,
*r_subcurve = NULL;
if (!string || !*string
- || !strcmp (string, "default") || !strcmp (string, "-"))
+ || !ascii_strcasecmp (string, "default") || !strcmp (string, "-"))
string = get_default_pubkey_algo ();
- else if (!strcmp (string, "future-default"))
+ else if (!ascii_strcasecmp (string, "future-default")
+ || !ascii_strcasecmp (string, "futuredefault"))
string = FUTURE_STD_KEY_PARAM;
primary = xstrdup (string);
@@ -3984,9 +3985,10 @@ quick_generate_keypair (ctrl_t ctrl, const char *uid, const char *algostr,
if (!*expirestr || strcmp (expirestr, "-") == 0)
expirestr = default_expiration_interval;
- if ((!*algostr || !strcmp (algostr, "default")
- || !strcmp (algostr, "future-default"))
- && (!*usagestr || !strcmp (usagestr, "default")
+ if ((!*algostr || !ascii_strcasecmp (algostr, "default")
+ || !ascii_strcasecmp (algostr, "future-default")
+ || !ascii_strcasecmp (algostr, "futuredefault"))
+ && (!*usagestr || !ascii_strcasecmp (usagestr, "default")
|| !strcmp (usagestr, "-")))
{
/* Use default key parameters. */
@@ -4928,7 +4930,7 @@ parse_algo_usage_expire (ctrl_t ctrl, int for_subkey,
/* Parse the usage string. */
if (!usagestr || !*usagestr
- || !strcmp (usagestr, "default") || !strcmp (usagestr, "-"))
+ || !ascii_strcasecmp (usagestr, "default") || !strcmp (usagestr, "-"))
; /* Keep usage from parse_key_parameter_string. */
else if ((wantuse = parse_usagestr (usagestr)) != -1)
use = wantuse;
-----------------------------------------------------------------------
Summary of changes:
g10/keygen.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list