gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: add additional test condition for GNS cr


From: gnunet
Subject: [gnunet] branch master updated: add additional test condition for GNS crypto
Date: Mon, 25 May 2020 23:41:01 +0200

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

dold pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 2a82be115 add additional test condition for GNS crypto
2a82be115 is described below

commit 2a82be115c2a47eab1fed70d8c85a8b2711f13d1
Author: Florian Dold <address@hidden>
AuthorDate: Tue May 26 03:05:33 2020 +0530

    add additional test condition for GNS crypto
---
 src/util/test_crypto_ecdsa.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/util/test_crypto_ecdsa.c b/src/util/test_crypto_ecdsa.c
index cfa236d6d..7908590a8 100644
--- a/src/util/test_crypto_ecdsa.c
+++ b/src/util/test_crypto_ecdsa.c
@@ -107,6 +107,7 @@ testDeriveSignVerify (void)
   struct GNUNET_CRYPTO_EcdsaPrivateKey *dpriv;
   struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
   struct GNUNET_CRYPTO_EcdsaPublicKey dpub;
+  struct GNUNET_CRYPTO_EcdsaPublicKey dpub2;
 
   dpriv = GNUNET_CRYPTO_ecdsa_private_key_derive (&key,
                                                   "test-derive",
@@ -117,9 +118,17 @@ testDeriveSignVerify (void)
                                          "test-derive",
                                          "test-CTX",
                                          &dpub);
+  GNUNET_CRYPTO_ecdsa_key_get_public (dpriv, &dpub2);
   purp.size = htonl (sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose));
   purp.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST);
 
+  if (0 != GNUNET_memcmp (&dpub.q_y, &dpub2.q_y))
+  {
+    fprintf (stderr, "%s", "key derivation failed\n");
+    GNUNET_free (dpriv);
+    return GNUNET_SYSERR;
+  }
+
   if (GNUNET_SYSERR ==
       GNUNET_CRYPTO_ecdsa_sign_ (dpriv,
                                  &purp,

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]