summaryrefslogtreecommitdiffstats
path: root/tools/gpg-pair-tool.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2019-06-20 06:22:06 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2019-09-19 11:36:11 +0200
commitb928de70e072fce15d7bba39f370d32dd8b74095 (patch)
treebf8ad971e1582985d6fe8bf8c2ffb13aa1bbed4f /tools/gpg-pair-tool.c
parenttools: Use new API of libgcrypt for gpg-pair-tool. (diff)
downloadgnupg2-b928de70e072fce15d7bba39f370d32dd8b74095.tar.xz
gnupg2-b928de70e072fce15d7bba39f370d32dd8b74095.zip
tools: Don't prepare G in gpg-pair-tool.
* tools/gpg-pair-tool.c (create_dh_keypair): Use NULL for G. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'tools/gpg-pair-tool.c')
-rw-r--r--tools/gpg-pair-tool.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/gpg-pair-tool.c b/tools/gpg-pair-tool.c
index 06b258f90..666a0bc32 100644
--- a/tools/gpg-pair-tool.c
+++ b/tools/gpg-pair-tool.c
@@ -1022,7 +1022,6 @@ create_dh_keypair (unsigned char *dh_secret, size_t dh_secret_len,
{
gpg_error_t err;
unsigned char *p;
- const unsigned char G[32] = { 0x9 };
/* We need a temporary buffer for the public key. Check the length
* for the later memcpy. */
@@ -1036,7 +1035,7 @@ create_dh_keypair (unsigned char *dh_secret, size_t dh_secret_len,
memcpy (dh_secret, p, 32);
xfree (p);
- err = gcry_ecc_mul_point (GCRY_ECC_CURVE25519, &p, dh_secret, G);
+ err = gcry_ecc_mul_point (GCRY_ECC_CURVE25519, &p, dh_secret, NULL);
if (err)
return err;