aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-11-25 22:33:49 -0500
committerNick Mathewson <nickm@torproject.org>2015-11-25 22:33:49 -0500
commite5754c42d124549b3fd8e8d7c11d4dde3b5acec1 (patch)
treeb0ff2b0c1f4cfb44f087df8d062e3a56fd766046 /src/test
parentc875265bbbddc50674f65169ee49d5612bef72a7 (diff)
parent943369f927967268cacd2067ccae0bc5f1c5835e (diff)
downloadtor-e5754c42d124549b3fd8e8d7c11d4dde3b5acec1.tar.gz
tor-e5754c42d124549b3fd8e8d7c11d4dde3b5acec1.zip
Merge branch 'bug17686_v2_027'
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bench.c5
-rw-r--r--src/test/test_extorport.c5
-rw-r--r--src/test/test_workqueue.c10
-rw-r--r--src/test/testing_common.c5
4 files changed, 18 insertions, 7 deletions
diff --git a/src/test/bench.c b/src/test/bench.c
index 2a27377c80..70ec025b7b 100644
--- a/src/test/bench.c
+++ b/src/test/bench.c
@@ -643,7 +643,10 @@ main(int argc, const char **argv)
reset_perftime();
- crypto_seed_rng();
+ if (crypto_seed_rng() < 0) {
+ printf("Couldn't seed RNG; exiting.\n");
+ return 1;
+ }
crypto_init_siphash_key();
options = options_new();
init_logging(1);
diff --git a/src/test/test_extorport.c b/src/test/test_extorport.c
index 2e5a32eef3..5d38ed8fa2 100644
--- a/src/test/test_extorport.c
+++ b/src/test/test_extorport.c
@@ -309,15 +309,14 @@ test_ext_or_cookie_auth(void *arg)
tor_free(client_hash2);
}
-static int
+static void
crypto_rand_return_tse_str(char *to, size_t n)
{
if (n != 32) {
TT_FAIL(("Asked for %d bytes, not 32", (int)n));
- return -1;
+ return;
}
memcpy(to, "te road There is always another ", 32);
- return 0;
}
static void
diff --git a/src/test/test_workqueue.c b/src/test/test_workqueue.c
index 0d79733cf0..1202f80fa3 100644
--- a/src/test/test_workqueue.c
+++ b/src/test/test_workqueue.c
@@ -390,8 +390,14 @@ main(int argc, char **argv)
init_logging(1);
network_init();
- crypto_global_init(1, NULL, NULL);
- crypto_seed_rng();
+ if (crypto_global_init(1, NULL, NULL) < 0) {
+ printf("Couldn't initialize crypto subsystem; exiting.\n");
+ return 1;
+ }
+ if (crypto_seed_rng() < 0) {
+ printf("Couldn't seed RNG; exiting.\n");
+ return 1;
+ }
rq = replyqueue_new(as_flags);
tor_assert(rq);
diff --git a/src/test/testing_common.c b/src/test/testing_common.c
index 441024bd7d..2ea158fddd 100644
--- a/src/test/testing_common.c
+++ b/src/test/testing_common.c
@@ -272,7 +272,10 @@ main(int c, const char **v)
return 1;
}
crypto_set_tls_dh_prime();
- crypto_seed_rng();
+ if (crypto_seed_rng() < 0) {
+ printf("Couldn't seed RNG; exiting.\n");
+ return 1;
+ }
rep_hist_init();
network_init();
setup_directory();