mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix make check-spaces
This commit is contained in:
@@ -45,7 +45,7 @@ origin_circuit_t *circuit_get_by_global_id(uint32_t id);
|
||||
origin_circuit_t *circuit_get_ready_rend_circ_by_rend_data(
|
||||
const rend_data_t *rend_data);
|
||||
origin_circuit_t *circuit_get_next_by_pk_and_purpose(origin_circuit_t *start,
|
||||
const uint8_t *digest, uint8_t purpose);
|
||||
const uint8_t *digest, uint8_t purpose);
|
||||
or_circuit_t *circuit_get_rendezvous(const uint8_t *cookie);
|
||||
or_circuit_t *circuit_get_intro_point(const uint8_t *digest);
|
||||
void circuit_set_rendezvous_cookie(or_circuit_t *circ, const uint8_t *cookie);
|
||||
|
||||
+1
-1
@@ -174,7 +174,7 @@ circuit_is_acceptable(const origin_circuit_t *origin_circ,
|
||||
(!edge_conn->rend_data && origin_circ->rend_data) ||
|
||||
(edge_conn->rend_data && origin_circ->rend_data &&
|
||||
rend_cmp_service_ids(rend_data_get_address(edge_conn->rend_data),
|
||||
rend_data_get_address(origin_circ->rend_data)))) {
|
||||
rend_data_get_address(origin_circ->rend_data)))) {
|
||||
/* this circ is not for this conn */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -382,3 +382,4 @@ hs_cache_free_all(void)
|
||||
digest256map_free(hs_cache_v3_dir, cache_dir_desc_free_);
|
||||
hs_cache_v3_dir = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -278,3 +278,4 @@ hs_v3_protocol_is_enabled(void)
|
||||
* it's enabled if the parameter is not found. */
|
||||
return networkstatus_get_param(NULL, "EnableOnionServicesV3", 1, 0, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -314,7 +314,8 @@ encode_enc_key(const ed25519_keypair_t *sig_key,
|
||||
&ip->enc_key.curve25519)) {
|
||||
goto err;
|
||||
}
|
||||
tor_cert_t *cross_cert = tor_cert_create(&curve_kp, CERT_TYPE_CROSS_HS_IP_KEYS,
|
||||
tor_cert_t *cross_cert = tor_cert_create(&curve_kp,
|
||||
CERT_TYPE_CROSS_HS_IP_KEYS,
|
||||
&sig_key->pubkey, now,
|
||||
HS_DESC_CERT_LIFETIME,
|
||||
CERT_FLAG_INCLUDE_SIGNING_KEY);
|
||||
|
||||
@@ -1028,4 +1028,3 @@ rend_circuit_pk_digest_eq(const origin_circuit_t *ocirc,
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -5761,7 +5761,7 @@ test_dir_post_parsing(void *arg)
|
||||
version = parse_hs_version_from_post("/tor/hs/42/publish", prefix, &end);
|
||||
tt_int_op(version, OP_EQ, 42);
|
||||
tt_str_op(end, OP_EQ, "/publish");
|
||||
version = parse_hs_version_from_post("/tor/hs/18163/publish", prefix, &end);
|
||||
version = parse_hs_version_from_post("/tor/hs/18163/publish",prefix, &end);
|
||||
tt_int_op(version, OP_EQ, 18163);
|
||||
tt_str_op(end, OP_EQ, "/publish");
|
||||
version = parse_hs_version_from_post("JUNKJUNKJUNK", prefix, &end);
|
||||
|
||||
@@ -93,7 +93,7 @@ helper_build_hs_desc(uint64_t revision_counter, uint32_t lifetime,
|
||||
/* Setup encrypted data section. */
|
||||
desc->encrypted_data.create2_ntor = 1;
|
||||
desc->encrypted_data.auth_types = smartlist_new();
|
||||
smartlist_add(desc->encrypted_data.auth_types, strdup("ed25519"));
|
||||
smartlist_add(desc->encrypted_data.auth_types, tor_strdup("ed25519"));
|
||||
desc->encrypted_data.intro_points = smartlist_new();
|
||||
/* Add an intro point. */
|
||||
smartlist_add(desc->encrypted_data.intro_points,
|
||||
|
||||
@@ -102,7 +102,7 @@ helper_build_hs_desc(unsigned int no_ip)
|
||||
/* Setup encrypted data section. */
|
||||
desc->encrypted_data.create2_ntor = 1;
|
||||
desc->encrypted_data.auth_types = smartlist_new();
|
||||
smartlist_add(desc->encrypted_data.auth_types, strdup("ed25519"));
|
||||
smartlist_add(desc->encrypted_data.auth_types, tor_strdup("ed25519"));
|
||||
desc->encrypted_data.intro_points = smartlist_new();
|
||||
if (!no_ip) {
|
||||
/* Add four intro points. */
|
||||
@@ -294,7 +294,7 @@ test_cert_encoding(void *arg)
|
||||
|
||||
done:
|
||||
tor_cert_free(cert);
|
||||
free(encoded);
|
||||
tor_free(encoded);
|
||||
}
|
||||
|
||||
/* Test the descriptor padding. */
|
||||
@@ -1054,7 +1054,8 @@ test_validate_cert(void *arg)
|
||||
tor_cert_free(cert);
|
||||
|
||||
/* Try a cert without including the signing key. */
|
||||
cert = tor_cert_create(&kp, CERT_TYPE_AUTH_HS_IP_KEY, &kp.pubkey, now, 3600, 0);
|
||||
cert = tor_cert_create(&kp, CERT_TYPE_AUTH_HS_IP_KEY, &kp.pubkey, now,
|
||||
3600, 0);
|
||||
tt_assert(cert);
|
||||
/* Test with a bad type. */
|
||||
ret = cert_is_valid(cert, CERT_TYPE_AUTH_HS_IP_KEY, "unicorn");
|
||||
|
||||
Reference in New Issue
Block a user