[tor-commits] [tor/master] Stop test & bench build failures with --disable-curve25519
nickm at torproject.org
nickm at torproject.org
Mon Sep 29 02:54:57 UTC 2014
commit ffd92e8ef885f4a63fd09892d508674c9b4a1daf
Author: teor <teor2345 at gmail.com>
Date: Mon Sep 29 12:06:15 2014 +1000
Stop test & bench build failures with --disable-curve25519
Ensure test & bench code that references curve25519 is disabled by the
appropriate macros. tor now builds with and without --disable-curve25519.
---
changes/bug13285-disable-curve25519-build-errors | 3 +++
src/test/bench.c | 4 ++--
src/test/test_crypto.c | 5 ++---
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/changes/bug13285-disable-curve25519-build-errors b/changes/bug13285-disable-curve25519-build-errors
new file mode 100644
index 0000000..285b642
--- /dev/null
+++ b/changes/bug13285-disable-curve25519-build-errors
@@ -0,0 +1,3 @@
+ o Minor bugfixes:
+ - Stop test & bench build failures with --disable-curve25519.
+ Fixes bug 13285.
diff --git a/src/test/bench.c b/src/test/bench.c
index 98e45d2..1204854 100644
--- a/src/test/bench.c
+++ b/src/test/bench.c
@@ -236,7 +236,6 @@ bench_onion_ntor(void)
ntor_handshake_state_free(state);
dimap_free(keymap, NULL);
}
-#endif
static void
bench_ed25519(void)
@@ -294,6 +293,7 @@ bench_ed25519(void)
printf("Blind a public key: %.2f usec\n",
MICROCOUNT(start, end, iters));
}
+#endif
static void
bench_cell_aes(void)
@@ -575,8 +575,8 @@ static struct benchmark_t benchmarks[] = {
ENT(onion_TAP),
#ifdef CURVE25519_ENABLED
ENT(onion_ntor),
-#endif
ENT(ed25519),
+#endif
ENT(cell_aes),
ENT(cell_ops),
ENT(dh),
diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c
index 0c87c88..32ea2f6 100644
--- a/src/test/test_crypto.c
+++ b/src/test/test_crypto.c
@@ -13,9 +13,9 @@
#include "siphash.h"
#ifdef CURVE25519_ENABLED
#include "crypto_curve25519.h"
+#endif
#include "crypto_ed25519.h"
#include "ed25519_vectors.inc"
-#endif
#include "crypto_s2k.h"
#include "crypto_pwbox.h"
@@ -1697,8 +1697,6 @@ test_crypto_ed25519_test_vectors(void *arg)
tor_free(mem_op_hex_tmp);
}
-#endif
-
static void
test_crypto_ed25519_encode(void *arg)
{
@@ -1875,6 +1873,7 @@ test_crypto_ed25519_testvectors(void *arg)
done:
tor_free(mem_op_hex_tmp);
}
+#endif /* CURVE25519_ENABLED */
static void
test_crypto_siphash(void *arg)
More information about the tor-commits
mailing list