aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-02-02 16:31:32 -0500
committerNick Mathewson <nickm@torproject.org>2015-02-02 16:31:32 -0500
commitd03e1da232ada2e0d3a3de3dbf6885caec74e4e0 (patch)
treecd3fc872abd2f7fa80af365887a0ea87564199b8 /src/test
parent3b96bf68315083f83a5f807ccf6f41feafeeb445 (diff)
parent41ba4f5627326e1745f0eea143f038677170c596 (diff)
downloadtor-d03e1da232ada2e0d3a3de3dbf6885caec74e4e0.tar.gz
tor-d03e1da232ada2e0d3a3de3dbf6885caec74e4e0.zip
Merge remote-tracking branch 'public/bug9635_warnings_025'
Conflicts: src/test/test.c
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bench.c6
-rw-r--r--src/test/test.c10
-rw-r--r--src/test/test_ntor_cl.c2
3 files changed, 10 insertions, 8 deletions
diff --git a/src/test/bench.c b/src/test/bench.c
index 68870f8657..5cbc072700 100644
--- a/src/test/bench.c
+++ b/src/test/bench.c
@@ -164,7 +164,8 @@ bench_onion_TAP(void)
char key_out[CPATH_KEY_MATERIAL_LEN];
int s;
dh = crypto_dh_dup(dh_out);
- s = onion_skin_TAP_client_handshake(dh, or, key_out, sizeof(key_out));
+ s = onion_skin_TAP_client_handshake(dh, or, key_out, sizeof(key_out),
+ NULL);
crypto_dh_free(dh);
tor_assert(s == 0);
}
@@ -223,7 +224,8 @@ bench_onion_ntor(void)
for (i = 0; i < iters; ++i) {
uint8_t key_out[CPATH_KEY_MATERIAL_LEN];
int s;
- s = onion_skin_ntor_client_handshake(state, or, key_out, sizeof(key_out));
+ s = onion_skin_ntor_client_handshake(state, or, key_out, sizeof(key_out),
+ NULL);
tor_assert(s == 0);
}
end = perftime();
diff --git a/src/test/test.c b/src/test/test.c
index ff4f517ac5..85a7ad6c7c 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -106,7 +106,7 @@ test_onion_handshake(void *arg)
/* client handshake 2 */
memset(c_keys, 0, 40);
- tt_assert(! onion_skin_TAP_client_handshake(c_dh, s_buf, c_keys, 40));
+ tt_assert(! onion_skin_TAP_client_handshake(c_dh, s_buf, c_keys, 40, NULL));
tt_mem_op(c_keys,OP_EQ, s_keys, 40);
memset(s_buf, 0, 40);
@@ -179,18 +179,18 @@ test_bad_onion_handshake(void *arg)
/* Client: Case 1: The server sent back junk. */
s_buf[64] ^= 33;
tt_int_op(-1, OP_EQ,
- onion_skin_TAP_client_handshake(c_dh, s_buf, c_keys, 40));
+ onion_skin_TAP_client_handshake(c_dh, s_buf, c_keys, 40, NULL));
s_buf[64] ^= 33;
/* Let the client finish; make sure it can. */
tt_int_op(0, OP_EQ,
- onion_skin_TAP_client_handshake(c_dh, s_buf, c_keys, 40));
+ onion_skin_TAP_client_handshake(c_dh, s_buf, c_keys, 40, NULL));
tt_mem_op(s_keys,OP_EQ, c_keys, 40);
/* Client: Case 2: The server sent back a degenerate DH. */
memset(s_buf, 0, sizeof(s_buf));
tt_int_op(-1, OP_EQ,
- onion_skin_TAP_client_handshake(c_dh, s_buf, c_keys, 40));
+ onion_skin_TAP_client_handshake(c_dh, s_buf, c_keys, 40, NULL));
done:
crypto_dh_free(c_dh);
@@ -239,7 +239,7 @@ test_ntor_handshake(void *arg)
/* client handshake 2 */
memset(c_keys, 0, 40);
tt_int_op(0, OP_EQ, onion_skin_ntor_client_handshake(c_state, s_buf,
- c_keys, 400));
+ c_keys, 400, NULL));
tt_mem_op(c_keys,OP_EQ, s_keys, 400);
memset(s_buf, 0, 40);
diff --git a/src/test/test_ntor_cl.c b/src/test/test_ntor_cl.c
index 955b508ef0..bfbf13a476 100644
--- a/src/test/test_ntor_cl.c
+++ b/src/test/test_ntor_cl.c
@@ -126,7 +126,7 @@ client2(int argc, char **argv)
keys = tor_malloc(keybytes);
hexkeys = tor_malloc(keybytes*2+1);
- if (onion_skin_ntor_client_handshake(&state, msg, keys, keybytes)<0) {
+ if (onion_skin_ntor_client_handshake(&state, msg, keys, keybytes, NULL)<0) {
fprintf(stderr, "handshake failed");
result = 2;
goto done;