aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-06-28 13:49:11 +0000
committerWerner Koch <[email protected]>2016-06-28 13:53:59 +0000
commit20ca075d9605e27e25a780bcc465c7371400ca61 (patch)
treec057b8c09f9146c827203116eaf64b65dceab03c
parentcommon: New function rfctimestamp. (diff)
downloadgnupg-20ca075d9605e27e25a780bcc465c7371400ca61.tar.gz
gnupg-20ca075d9605e27e25a780bcc465c7371400ca61.zip
gpg: Add hack to --quick-gen-key to create Curve25519 keys.
* g10/keygen.c (quick_generate_keypair): Add special algo string "test-default". -- Well, this is a hack to quickly create keys with the algorithms we will eventually use as defaults. Usage: gpg -v --quick-gen-key --passphrase '' --batch USERID test-default Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--g10/keygen.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/g10/keygen.c b/g10/keygen.c
index b7c8e83ac..c5612756c 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -3610,7 +3610,13 @@ quick_generate_keypair (ctrl_t ctrl, const char *uid, const char *algostr,
}
}
- if (*algostr || *usagestr || *expirestr)
+
+ if (!strcmp (algostr, "test-default"))
+ {
+ para = quickgen_set_para (para, 0, PUBKEY_ALGO_EDDSA, 0, "Ed25519", 0);
+ para = quickgen_set_para (para, 1, PUBKEY_ALGO_ECDH, 0, "Curve25519", 0);
+ }
+ else if (*algostr || *usagestr || *expirestr)
{
/* Extended unattended mode. Creates only the primary key. */
int algo;