aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_ntor_cl.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-11 16:54:05 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-31 19:46:00 -0400
commitf64c9dccde9ac8261c9f80ed063acc7988d6836c (patch)
tree2d87461b8dc8a25437454af0d6dff1b8a9c04516 /src/test/test_ntor_cl.c
parent27dd2b1f1ff612977ec50c9e15dbe14607b0551b (diff)
downloadtor-f64c9dccde9ac8261c9f80ed063acc7988d6836c.tar.gz
tor-f64c9dccde9ac8261c9f80ed063acc7988d6836c.zip
Use NSS's digest code in Tor.
This was a fairly straightforward port, once I realized which layer I should be calling into.
Diffstat (limited to 'src/test/test_ntor_cl.c')
-rw-r--r--src/test/test_ntor_cl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/test_ntor_cl.c b/src/test/test_ntor_cl.c
index b8d3a8b426..3f914523a3 100644
--- a/src/test/test_ntor_cl.c
+++ b/src/test/test_ntor_cl.c
@@ -9,6 +9,7 @@
#include "core/or/or.h"
#include "lib/crypt_ops/crypto_cipher.h"
#include "lib/crypt_ops/crypto_curve25519.h"
+#include "lib/crypt_ops/crypto_init.h"
#include "core/crypto/onion_ntor.h"
#define N_ARGS(n) STMT_BEGIN { \
@@ -153,7 +154,11 @@ main(int argc, char **argv)
return 1;
}
+ init_logging(1);
curve25519_init();
+ if (crypto_global_init(0, NULL, NULL) < 0)
+ return 1;
+
if (!strcmp(argv[1], "client1")) {
return client1(argc, argv);
} else if (!strcmp(argv[1], "server1")) {
@@ -165,4 +170,3 @@ main(int argc, char **argv)
return 1;
}
}
-