summaryrefslogtreecommitdiff
path: root/src/test/bench.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/bench.c')
-rw-r--r--src/test/bench.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test/bench.c b/src/test/bench.c
index ca01d3c3e6..c9cc101b72 100644
--- a/src/test/bench.c
+++ b/src/test/bench.c
@@ -14,8 +14,6 @@ const char tor_git_revision[] = "";
#include "orconfig.h"
-#define RELAY_PRIVATE
-
#include "or.h"
#include "onion_tap.h"
#include "relay.h"
@@ -440,6 +438,10 @@ bench_ecdh_impl(int nid, const char *name)
ssize_t slen_a, slen_b;
EC_KEY *dh_a = EC_KEY_new_by_curve_name(nid);
EC_KEY *dh_b = EC_KEY_new_by_curve_name(nid);
+ if (!dh_a || !dh_b) {
+ puts("Skipping. (No implementation?)");
+ return;
+ }
EC_KEY_generate_key(dh_a);
EC_KEY_generate_key(dh_b);
@@ -542,6 +544,7 @@ main(int argc, const char **argv)
reset_perftime();
crypto_seed_rng(1);
+ crypto_init_siphash_key();
options = options_new();
init_logging();
options->command = CMD_RUN_UNITTESTS;