mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-09-21 21:44:58 +02:00
Make check-spaces happy :)
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
This commit is contained in:
parent
a8efd087bd
commit
d795ed5871
@ -365,3 +365,4 @@ hs_cache_init(void)
|
|||||||
tor_assert(!hs_cache_v3_dir);
|
tor_assert(!hs_cache_v3_dir);
|
||||||
hs_cache_v3_dir = digest256map_new();
|
hs_cache_v3_dir = digest256map_new();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,3 +57,4 @@ STATIC size_t cache_clean_v3_as_dir(time_t now, time_t global_cutoff);
|
|||||||
#endif /* HS_CACHE_PRIVATE */
|
#endif /* HS_CACHE_PRIVATE */
|
||||||
|
|
||||||
#endif /* TOR_HS_CACHE_H */
|
#endif /* TOR_HS_CACHE_H */
|
||||||
|
|
||||||
|
@ -262,3 +262,4 @@ rend_data_get_pk_digest(const rend_data_t *rend_data, size_t *len_out)
|
|||||||
tor_assert(0);
|
tor_assert(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,3 +34,4 @@ const uint8_t *rend_data_get_pk_digest(const rend_data_t *rend_data,
|
|||||||
size_t *len_out);
|
size_t *len_out);
|
||||||
|
|
||||||
#endif /* TOR_HS_COMMON_H */
|
#endif /* TOR_HS_COMMON_H */
|
||||||
|
|
||||||
|
@ -1326,9 +1326,9 @@ decode_introduction_point(const hs_descriptor_t *desc, const char *start)
|
|||||||
return ip;
|
return ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Given a descriptor string at <b>data</b>, decode all possible introduction points
|
/* Given a descriptor string at <b>data</b>, decode all possible introduction
|
||||||
* that we can find. Add the introduction point object to desc_enc as we find
|
* points that we can find. Add the introduction point object to desc_enc as we
|
||||||
* them. Return 0 on success.
|
* find them. Return 0 on success.
|
||||||
*
|
*
|
||||||
* On error, a negative value is returned. It is possible that some intro
|
* On error, a negative value is returned. It is possible that some intro
|
||||||
* point object have been added to the desc_enc, they should be considered
|
* point object have been added to the desc_enc, they should be considered
|
||||||
@ -1557,6 +1557,7 @@ desc_decode_plaintext_v3(smartlist_t *tokens,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -1930,3 +1931,4 @@ hs_desc_plaintext_obj_size(const hs_desc_plaintext_data_t *data)
|
|||||||
return (sizeof(*data) + sizeof(*data->signing_key_cert) +
|
return (sizeof(*data) + sizeof(*data->signing_key_cert) +
|
||||||
data->encrypted_blob_size);
|
data->encrypted_blob_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,3 +235,4 @@ STATIC int desc_sig_is_valid(const char *b64_sig,
|
|||||||
#endif /* HS_DESCRIPTOR_PRIVATE */
|
#endif /* HS_DESCRIPTOR_PRIVATE */
|
||||||
|
|
||||||
#endif /* TOR_HS_DESCRIPTOR_H */
|
#endif /* TOR_HS_DESCRIPTOR_H */
|
||||||
|
|
||||||
|
@ -146,7 +146,6 @@ tokenize_string(memarea_t *area,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Helper: parse space-separated arguments from the string <b>s</b> ending at
|
/** Helper: parse space-separated arguments from the string <b>s</b> ending at
|
||||||
* <b>eol</b>, and store them in the args field of <b>tok</b>. Store the
|
* <b>eol</b>, and store them in the args field of <b>tok</b>. Store the
|
||||||
* number of parsed elements into the n_args field of <b>tok</b>. Allocate
|
* number of parsed elements into the n_args field of <b>tok</b>. Allocate
|
||||||
@ -243,8 +242,6 @@ token_check_object(memarea_t *area, const char *kwd,
|
|||||||
return tok;
|
return tok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Helper function: read the next token from *s, advance *s to the end of the
|
/** Helper function: read the next token from *s, advance *s to the end of the
|
||||||
* token, and return the parsed token. Parse *<b>s</b> according to the list
|
* token, and return the parsed token. Parse *<b>s</b> according to the list
|
||||||
* of tokens in <b>table</b>.
|
* of tokens in <b>table</b>.
|
||||||
@ -408,7 +405,6 @@ get_next_token(memarea_t *area,
|
|||||||
#undef STRNDUP
|
#undef STRNDUP
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Find the first token in <b>s</b> whose keyword is <b>keyword</b>; fail
|
/** Find the first token in <b>s</b> whose keyword is <b>keyword</b>; fail
|
||||||
* with an assert if no such keyword is found.
|
* with an assert if no such keyword is found.
|
||||||
*/
|
*/
|
||||||
@ -451,3 +447,4 @@ find_all_by_keyword(smartlist_t *s, directory_keyword k)
|
|||||||
});
|
});
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
* \brief Header file for parsecommon.c
|
* \brief Header file for parsecommon.c
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
|
||||||
#ifndef TOR_PARSECOMMON_H
|
#ifndef TOR_PARSECOMMON_H
|
||||||
#define TOR_PARSECOMMON_H
|
#define TOR_PARSECOMMON_H
|
||||||
|
|
||||||
@ -304,3 +303,4 @@ directory_token_t *find_opt_by_keyword(smartlist_t *s,
|
|||||||
smartlist_t * find_all_by_keyword(smartlist_t *s, directory_keyword k);
|
smartlist_t * find_all_by_keyword(smartlist_t *s, directory_keyword k);
|
||||||
|
|
||||||
#endif /* TOR_PARSECOMMON_H */
|
#endif /* TOR_PARSECOMMON_H */
|
||||||
|
|
||||||
|
@ -978,3 +978,4 @@ rend_circuit_pk_digest_eq(const origin_circuit_t *ocirc,
|
|||||||
match:
|
match:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -350,7 +350,8 @@ test_hs_rend_data(void *arg)
|
|||||||
tt_str_op(client_dup_v2->onion_address, OP_EQ, client_v2->onion_address);
|
tt_str_op(client_dup_v2->onion_address, OP_EQ, client_v2->onion_address);
|
||||||
tt_mem_op(client_dup_v2->desc_id_fetch, OP_EQ, client_v2->desc_id_fetch,
|
tt_mem_op(client_dup_v2->desc_id_fetch, OP_EQ, client_v2->desc_id_fetch,
|
||||||
sizeof(client_dup_v2->desc_id_fetch));
|
sizeof(client_dup_v2->desc_id_fetch));
|
||||||
tt_mem_op(client_dup_v2->descriptor_cookie, OP_EQ, client_v2->descriptor_cookie,
|
tt_mem_op(client_dup_v2->descriptor_cookie, OP_EQ,
|
||||||
|
client_v2->descriptor_cookie,
|
||||||
sizeof(client_dup_v2->descriptor_cookie));
|
sizeof(client_dup_v2->descriptor_cookie));
|
||||||
|
|
||||||
tt_assert(client_dup->hsdirs_fp);
|
tt_assert(client_dup->hsdirs_fp);
|
||||||
|
@ -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));
|
hs_desc_link_specifier_t *ls = tor_malloc_zero(sizeof(*ls));
|
||||||
if (legacy) {
|
if (legacy) {
|
||||||
ls->type = LS_LEGACY_ID;
|
ls->type = LS_LEGACY_ID;
|
||||||
memcpy(ls->u.legacy_id, "0299F268FCA9D55CD157976D39AE92B4B455B3A8", DIGEST_LEN);
|
memcpy(ls->u.legacy_id, "0299F268FCA9D55CD157976D39AE92B4B455B3A8",
|
||||||
|
DIGEST_LEN);
|
||||||
} else {
|
} else {
|
||||||
ls->u.ap.port = 9001;
|
ls->u.ap.port = 9001;
|
||||||
int family = tor_addr_parse(&ls->u.ap.addr, addr);
|
int family = tor_addr_parse(&ls->u.ap.addr, addr);
|
||||||
@ -948,7 +949,8 @@ test_decode_plaintext(void *arg)
|
|||||||
"-----BEGIN %s-----\n" \
|
"-----BEGIN %s-----\n" \
|
||||||
"UNICORN\n" \
|
"UNICORN\n" \
|
||||||
"-----END MESSAGE-----\n" \
|
"-----END MESSAGE-----\n" \
|
||||||
"signature m20WJH5agqvwhq7QeuEZ1mYyPWQDO+eJOZUjLhAiKu8DbL17DsDfJE6kXbWyHimbNj2we0enV3cCOOAsmPOaAw\n"
|
"signature m20WJH5agqvwhq7QeuEZ1mYyPWQDO+eJOZUjLhAiKu8DbL17DsDfJE6kXbWy" \
|
||||||
|
"HimbNj2we0enV3cCOOAsmPOaAw\n"
|
||||||
|
|
||||||
/* Invalid version. */
|
/* Invalid version. */
|
||||||
{
|
{
|
||||||
@ -1125,3 +1127,4 @@ struct testcase_t hs_descriptor[] = {
|
|||||||
|
|
||||||
END_OF_TESTCASES
|
END_OF_TESTCASES
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user