[Pkg-gnupg-commit] [gnupg2] 62/160: gpg: Add hack to --quick-gen-key to create Curve25519 keys.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Fri Jul 15 09:36:36 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch upstream
in repository gnupg2.

commit 20ca075d9605e27e25a780bcc465c7371400ca61
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Jun 28 15:49:11 2016 +0200

    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 <wk at gnupg.org>
---
 g10/keygen.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/g10/keygen.c b/g10/keygen.c
index b7c8e83..c561275 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;

-- 
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