diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-05-06 17:29:28 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-05-19 02:41:47 +0200 |
commit | 6a52ce5f9bc35a852b215e7073f3a0d2665ca8de (patch) | |
tree | 563fe56465b5d21a27ad23e097295833111e8871 /src | |
parent | 338be6576f4d08f01a4d00fcc21956131eb1262b (diff) | |
download | gnunet-6a52ce5f9bc35a852b215e7073f3a0d2665ca8de.tar.gz gnunet-6a52ce5f9bc35a852b215e7073f3a0d2665ca8de.zip |
fix ftbfs
Diffstat (limited to 'src')
-rw-r--r-- | src/util/perf_crypto_asymmetric.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/util/perf_crypto_asymmetric.c b/src/util/perf_crypto_asymmetric.c index 49d9ec644..8533351e1 100644 --- a/src/util/perf_crypto_asymmetric.c +++ b/src/util/perf_crypto_asymmetric.c | |||
@@ -62,9 +62,9 @@ int | |||
62 | main (int argc, char *argv[]) | 62 | main (int argc, char *argv[]) |
63 | { | 63 | { |
64 | int i; | 64 | int i; |
65 | struct GNUNET_CRYPTO_EcdhePrivateKey *ecdhe[l]; | 65 | struct GNUNET_CRYPTO_EcdhePrivateKey ecdhe[l]; |
66 | struct GNUNET_CRYPTO_EcdhePublicKey dhpub[l]; | 66 | struct GNUNET_CRYPTO_EcdhePublicKey dhpub[l]; |
67 | struct GNUNET_CRYPTO_EddsaPrivateKey *eddsa[l]; | 67 | struct GNUNET_CRYPTO_EddsaPrivateKey eddsa[l]; |
68 | struct GNUNET_CRYPTO_EddsaPublicKey dspub[l]; | 68 | struct GNUNET_CRYPTO_EddsaPublicKey dspub[l]; |
69 | struct TestSig sig[l]; | 69 | struct TestSig sig[l]; |
70 | 70 | ||
@@ -82,18 +82,18 @@ main (int argc, char *argv[]) | |||
82 | 82 | ||
83 | start = GNUNET_TIME_absolute_get (); | 83 | start = GNUNET_TIME_absolute_get (); |
84 | for (i = 0; i < l; i++) | 84 | for (i = 0; i < l; i++) |
85 | eddsa[i] = GNUNET_CRYPTO_eddsa_key_create (); | 85 | GNUNET_CRYPTO_eddsa_key_create (&eddsa[i]); |
86 | log_duration ("EdDSA", "create key"); | 86 | log_duration ("EdDSA", "create key"); |
87 | 87 | ||
88 | start = GNUNET_TIME_absolute_get (); | 88 | start = GNUNET_TIME_absolute_get (); |
89 | for (i = 0; i < l; i++) | 89 | for (i = 0; i < l; i++) |
90 | GNUNET_CRYPTO_eddsa_key_get_public (eddsa[i], &dspub[i]); | 90 | GNUNET_CRYPTO_eddsa_key_get_public (&eddsa[i], &dspub[i]); |
91 | log_duration ("EdDSA", "get public"); | 91 | log_duration ("EdDSA", "get public"); |
92 | 92 | ||
93 | start = GNUNET_TIME_absolute_get (); | 93 | start = GNUNET_TIME_absolute_get (); |
94 | for (i = 0; i < l; i++) | 94 | for (i = 0; i < l; i++) |
95 | GNUNET_assert (GNUNET_OK == | 95 | GNUNET_assert (GNUNET_OK == |
96 | GNUNET_CRYPTO_eddsa_sign_ (eddsa[i], | 96 | GNUNET_CRYPTO_eddsa_sign_ (&eddsa[i], |
97 | &sig[i].purp, | 97 | &sig[i].purp, |
98 | &sig[i].sig)); | 98 | &sig[i].sig)); |
99 | log_duration ("EdDSA", "sign HashCode"); | 99 | log_duration ("EdDSA", "sign HashCode"); |
@@ -109,19 +109,19 @@ main (int argc, char *argv[]) | |||
109 | 109 | ||
110 | start = GNUNET_TIME_absolute_get (); | 110 | start = GNUNET_TIME_absolute_get (); |
111 | for (i = 0; i < l; i++) | 111 | for (i = 0; i < l; i++) |
112 | ecdhe[i] = GNUNET_CRYPTO_ecdhe_key_create (); | 112 | GNUNET_CRYPTO_ecdhe_key_create (&ecdhe[i]); |
113 | log_duration ("ECDH", "create key"); | 113 | log_duration ("ECDH", "create key"); |
114 | 114 | ||
115 | start = GNUNET_TIME_absolute_get (); | 115 | start = GNUNET_TIME_absolute_get (); |
116 | for (i = 0; i < l; i++) | 116 | for (i = 0; i < l; i++) |
117 | GNUNET_CRYPTO_ecdhe_key_get_public (ecdhe[i], &dhpub[i]); | 117 | GNUNET_CRYPTO_ecdhe_key_get_public (&ecdhe[i], &dhpub[i]); |
118 | log_duration ("ECDH", "get public"); | 118 | log_duration ("ECDH", "get public"); |
119 | 119 | ||
120 | start = GNUNET_TIME_absolute_get (); | 120 | start = GNUNET_TIME_absolute_get (); |
121 | for (i = 0; i < l - 1; i += 2) | 121 | for (i = 0; i < l - 1; i += 2) |
122 | { | 122 | { |
123 | GNUNET_CRYPTO_ecc_ecdh (ecdhe[i], &dhpub[i + 1], &sig[i].h); | 123 | GNUNET_CRYPTO_ecc_ecdh (&ecdhe[i], &dhpub[i + 1], &sig[i].h); |
124 | GNUNET_CRYPTO_ecc_ecdh (ecdhe[i + 1], &dhpub[i], &sig[i + 1].h); | 124 | GNUNET_CRYPTO_ecc_ecdh (&ecdhe[i + 1], &dhpub[i], &sig[i + 1].h); |
125 | } | 125 | } |
126 | log_duration ("ECDH", "do DH"); | 126 | log_duration ("ECDH", "do DH"); |
127 | 127 | ||