diff options
author | George Kadianakis <desnacked@riseup.net> | 2016-08-25 01:44:34 +0300 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2016-11-04 10:32:50 -0400 |
commit | d795ed5871010b8ad6d216f5f4381e4191cb147c (patch) | |
tree | 47dff1ca705a55c78e8725b5007e9de54f4717f9 /src/test/test_hs_descriptor.c | |
parent | a8efd087bdd937027713217d74e1cfd40fba4961 (diff) | |
download | tor-d795ed5871010b8ad6d216f5f4381e4191cb147c.tar.gz tor-d795ed5871010b8ad6d216f5f4381e4191cb147c.zip |
Make check-spaces happy :)
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
Diffstat (limited to 'src/test/test_hs_descriptor.c')
-rw-r--r-- | src/test/test_hs_descriptor.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c index d9030c1fc5..086d755bd3 100644 --- a/src/test/test_hs_descriptor.c +++ b/src/test/test_hs_descriptor.c @@ -29,7 +29,8 @@ helper_build_intro_point(const ed25519_keypair_t *blinded_kp, time_t now, hs_desc_link_specifier_t *ls = tor_malloc_zero(sizeof(*ls)); if (legacy) { ls->type = LS_LEGACY_ID; - memcpy(ls->u.legacy_id, "0299F268FCA9D55CD157976D39AE92B4B455B3A8", DIGEST_LEN); + memcpy(ls->u.legacy_id, "0299F268FCA9D55CD157976D39AE92B4B455B3A8", + DIGEST_LEN); } else { ls->u.ap.port = 9001; int family = tor_addr_parse(&ls->u.ap.addr, addr); @@ -106,16 +107,16 @@ helper_build_hs_desc(unsigned int no_ip) if (!no_ip) { /* Add four intro points. */ smartlist_add(desc->encrypted_data.intro_points, - helper_build_intro_point(&desc->plaintext_data.blinded_kp, now, + helper_build_intro_point(&desc->plaintext_data.blinded_kp, now, "1.2.3.4", 0)); smartlist_add(desc->encrypted_data.intro_points, - helper_build_intro_point(&desc->plaintext_data.blinded_kp, now, + helper_build_intro_point(&desc->plaintext_data.blinded_kp, now, "[2600::1]", 0)); smartlist_add(desc->encrypted_data.intro_points, - helper_build_intro_point(&desc->plaintext_data.blinded_kp, now, + helper_build_intro_point(&desc->plaintext_data.blinded_kp, now, "3.2.1.4", 1)); smartlist_add(desc->encrypted_data.intro_points, - helper_build_intro_point(&desc->plaintext_data.blinded_kp, now, + helper_build_intro_point(&desc->plaintext_data.blinded_kp, now, "", 1)); } @@ -171,7 +172,7 @@ helper_compare_hs_desc(const hs_descriptor_t *desc1, tt_assert(desc2->encrypted_data.intro_points); tt_int_op(smartlist_len(desc1->encrypted_data.intro_points), ==, smartlist_len(desc2->encrypted_data.intro_points)); - for (int i = 0; i < smartlist_len(desc1->encrypted_data.intro_points); i++) { + for (int i=0; i < smartlist_len(desc1->encrypted_data.intro_points); i++) { hs_desc_intro_point_t *ip1 = smartlist_get(desc1->encrypted_data .intro_points, i), *ip2 = smartlist_get(desc2->encrypted_data @@ -948,7 +949,8 @@ test_decode_plaintext(void *arg) "-----BEGIN %s-----\n" \ "UNICORN\n" \ "-----END MESSAGE-----\n" \ - "signature m20WJH5agqvwhq7QeuEZ1mYyPWQDO+eJOZUjLhAiKu8DbL17DsDfJE6kXbWyHimbNj2we0enV3cCOOAsmPOaAw\n" + "signature m20WJH5agqvwhq7QeuEZ1mYyPWQDO+eJOZUjLhAiKu8DbL17DsDfJE6kXbWy" \ + "HimbNj2we0enV3cCOOAsmPOaAw\n" /* Invalid version. */ { @@ -1125,3 +1127,4 @@ struct testcase_t hs_descriptor[] = { END_OF_TESTCASES }; + |