aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_crypto_ecdh_eddsa.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-05-17 00:16:09 +0200
committerChristian Grothoff <christian@grothoff.org>2018-05-17 00:16:09 +0200
commit20fe42aac530cadfd88e5e409184b361a7f14f8f (patch)
tree6b7a40297ea25f43a2443e5b2cf7e4f9fcd31096 /src/util/test_crypto_ecdh_eddsa.c
parent7cab5e7bd71c7f6e72833c12a4853db121dce581 (diff)
downloadgnunet-20fe42aac530cadfd88e5e409184b361a7f14f8f.tar.gz
gnunet-20fe42aac530cadfd88e5e409184b361a7f14f8f.zip
extend test to show crypto issue
Diffstat (limited to 'src/util/test_crypto_ecdh_eddsa.c')
-rw-r--r--src/util/test_crypto_ecdh_eddsa.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/util/test_crypto_ecdh_eddsa.c b/src/util/test_crypto_ecdh_eddsa.c
index ec7819c3b..efb9e0992 100644
--- a/src/util/test_crypto_ecdh_eddsa.c
+++ b/src/util/test_crypto_ecdh_eddsa.c
@@ -56,7 +56,8 @@ test_ecdh()
56 &id1, 56 &id1,
57 &dh[1])); 57 &dh[1]));
58 /* Check that both DH results are equal. */ 58 /* Check that both DH results are equal. */
59 GNUNET_assert (0 == memcmp (&dh[0], &dh[1], 59 GNUNET_assert (0 == memcmp (&dh[0],
60 &dh[1],
60 sizeof (struct GNUNET_HashCode))); 61 sizeof (struct GNUNET_HashCode)));
61 GNUNET_free (priv_dsa); 62 GNUNET_free (priv_dsa);
62 GNUNET_free (priv_ecdh); 63 GNUNET_free (priv_ecdh);
@@ -75,10 +76,13 @@ main (int argc, char *argv[])
75 return 0; 76 return 0;
76 } 77 }
77 if (getenv ("GNUNET_GCRYPT_DEBUG")) 78 if (getenv ("GNUNET_GCRYPT_DEBUG"))
78 gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0); 79 gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
79 GNUNET_log_setup ("test-crypto-ecdh-eddsa", "WARNING", NULL); 80 GNUNET_log_setup ("test-crypto-ecdh-eddsa", "WARNING", NULL);
80 if (0 != test_ecdh()) 81 for (unsigned int i=0;i<10000;i++)
81 return 1; 82 {
83 if (0 != test_ecdh())
84 return 1;
85 }
82 return 0; 86 return 0;
83} 87}
84 88