[Pkg-gnupg-commit] [gnupg2] 102/118: gpg: Allow use of "default" algo for--quick-addkey.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Sep 15 18:25:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch encoding-and-speling
in repository gnupg2.
commit 0fd332bc1f6f1f10c96da0cc91203925d3ac81eb
Author: Werner Koch <wk at gnupg.org>
Date: Wed Sep 14 09:46:10 2016 +0200
gpg: Allow use of "default" algo for--quick-addkey.
* g10/keygen.c (quick_generate_keypair): Write a status error.
(parse_algo_usage_expire): Set a default curve.
Signed-off-by: Werner Koch <wk at gnupg.org>
---
g10/keygen.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/g10/keygen.c b/g10/keygen.c
index e897075..9cf314d 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -3614,6 +3614,7 @@ quick_generate_keypair (ctrl_t ctrl, const char *uid, const char *algostr,
|| !cpr_get_answer_is_yes_def ("quick_keygen.force",
_("Create anyway? (y/N) "), 0))
{
+ write_status_error ("genkey", gpg_error (304));
log_inc_errorcount (); /* we used log_info */
goto leave;
}
@@ -4457,12 +4458,14 @@ parse_algo_usage_expire (ctrl_t ctrl, int for_subkey,
algo = for_subkey? DEFAULT_STD_SUBALGO : DEFAULT_STD_ALGO;
use = for_subkey? DEFAULT_STD_SUBKEYUSE : DEFAULT_STD_KEYUSE;
nbits = for_subkey? DEFAULT_STD_SUBKEYSIZE : DEFAULT_STD_KEYSIZE;
+ curve = for_subkey? DEFAULT_STD_SUBCURVE : DEFAULT_STD_CURVE;
}
else if (!strcmp (algostr, "future-default"))
{
algo = for_subkey? FUTURE_STD_SUBALGO : FUTURE_STD_ALGO;
use = for_subkey? FUTURE_STD_SUBKEYUSE : FUTURE_STD_KEYUSE;
nbits = for_subkey? FUTURE_STD_SUBKEYSIZE : FUTURE_STD_KEYSIZE;
+ curve = for_subkey? FUTURE_STD_SUBCURVE : FUTURE_STD_CURVE;
}
else if (*algostr == '&' && strlen (algostr) == 41)
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list