diff options
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/or/test.c b/src/or/test.c index 61daaf589..ab0f23275 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -650,7 +650,7 @@ test_onion_handshake() { /* server handshake */ memset(s_buf, 0, ONIONSKIN_REPLY_LEN); memset(s_keys, 0, 40); - test_assert(! onion_skin_server_handshake(c_buf, pk, s_buf, s_keys, 40)); + test_assert(! onion_skin_server_handshake(c_buf, pk, NULL, s_buf, s_keys, 40)); /* client handshake 2 */ memset(c_keys, 0, 40); @@ -701,8 +701,8 @@ test_dir_format() r1.dir_port = 9003; r1.onion_pkey = pk1; r1.identity_pkey = pk2; - r1.link_pkey = pk3; - r1.bandwidthrate = r1.bandwidthburst = 1000; + r1.bandwidthrate = 1000; + r1.bandwidthburst = 5000; r1.exit_policy = NULL; r1.nickname = "Magri"; r1.platform = tor_strdup(platform); @@ -727,7 +727,6 @@ test_dir_format() r2.dir_port = 0; r2.onion_pkey = pk2; r2.identity_pkey = pk1; - r2.link_pkey = pk2; r2.bandwidthrate = r2.bandwidthburst = 3000; r2.exit_policy = &ex1; r2.nickname = "Fred"; @@ -742,15 +741,14 @@ test_dir_format() memset(buf, 0, 2048); test_assert(router_dump_router_to_string(buf, 2048, &r1, pk2)>0); - strcpy(buf2, "router Magri testaddr1.foo.bar 9000 9002 9003 1000\n" + strcpy(buf2, "router Magri testaddr1.foo.bar 9000 9002 9003\n" "platform Tor "VERSION" on "); strcat(buf2, get_uname()); strcat(buf2, "\n" "published 1970-01-01 00:00:00\n" + "bandwidth 1000 5000\n" "onion-key\n"); strcat(buf2, pk1_str); - strcat(buf2, "link-key\n"); - strcat(buf2, pk3_str); strcat(buf2, "signing-key\n"); strcat(buf2, pk2_str); strcat(buf2, "router-signature\n"); @@ -767,9 +765,8 @@ test_dir_format() test_eq(rp1->socks_port, r1.socks_port); test_eq(rp1->dir_port, r1.dir_port); test_eq(rp1->bandwidthrate, r1.bandwidthrate); -// test_eq(rp1->bandwidthburst, r1.bandwidthburst); + test_eq(rp1->bandwidthburst, r1.bandwidthburst); test_assert(crypto_pk_cmp_keys(rp1->onion_pkey, pk1) == 0); - test_assert(crypto_pk_cmp_keys(rp1->link_pkey, pk3) == 0); test_assert(crypto_pk_cmp_keys(rp1->identity_pkey, pk2) == 0); test_assert(rp1->exit_policy == NULL); @@ -908,7 +905,7 @@ main(int c, char**v){ test_onion(); test_onion_handshake(); puts("\n========================= Directory Formats ==============="); -// add_stream_log(LOG_DEBUG, NULL, stdout); + /* add_stream_log(LOG_DEBUG, NULL, stdout); */ test_dir_format(); puts("\n========================= Rendezvous functionality ========"); test_rend_fns(); |