Appease make check-spaces

This commit is contained in:
Andrea Shepard 2015-06-01 12:59:14 +00:00
parent 90e07ab338
commit 0e0b65db4f
16 changed files with 29 additions and 19 deletions

View File

@ -501,3 +501,4 @@ aes_set_iv(aes_cnt_cipher_t *cipher, const char *iv)
}
#endif

View File

@ -88,7 +88,6 @@ int ed25519_public_blind(ed25519_public_key_t *out,
const ed25519_public_key_t *inp,
const uint8_t *param);
/* XXXX move these to crypto_format.h */
#define ED25519_BASE64_LEN 43
int ed25519_public_from_base64(ed25519_public_key_t *pkey,

View File

@ -1810,7 +1810,8 @@ rectify_client_ciphers(SSL *ssl)
SSL_CIPHER_get_name(cipher));
++j;
} else if (cipher &&
(SSL_CIPHER_get_id(cipher) & 0xffff) == CLIENT_CIPHER_INFO_LIST[i].id) {
(SSL_CIPHER_get_id(cipher) & 0xffff) ==
CLIENT_CIPHER_INFO_LIST[i].id) {
/* "cipher" is the cipher we expect. Put it on the list. */
log_debug(LD_NET, "Found cipher %s", SSL_CIPHER_get_name(cipher));
sk_SSL_CIPHER_push(CLIENT_CIPHER_STACK, cipher);

View File

@ -2004,7 +2004,7 @@ channel_tls_process_auth_challenge_cell(var_cell_t *cell, channel_tls_t *chan)
goto done;
}
done:
done:
auth_challenge_cell_free(ac);
#undef ERR

View File

@ -6029,7 +6029,7 @@ get_desc_id_from_query(const rend_data_t *rend_data, const char *hsdir_fp)
} SMARTLIST_FOREACH_END(fingerprint);
}
end:
end:
return desc_id;
}

View File

@ -59,8 +59,10 @@ ddmap_entry_set_digests(ddmap_entry_t *ent,
memcpy(ent->d + DIGEST_LEN, ed25519, DIGEST256_LEN);
}
HT_PROTOTYPE(double_digest_map, ddmap_entry_s, node, ddmap_entry_hash, ddmap_entry_eq);
HT_GENERATE2(double_digest_map, ddmap_entry_s, node, ddmap_entry_hash, ddmap_entry_eq, 0.6, tor_reallocarray, tor_free_);
HT_PROTOTYPE(double_digest_map, ddmap_entry_s, node, ddmap_entry_hash,
ddmap_entry_eq);
HT_GENERATE2(double_digest_map, ddmap_entry_s, node, ddmap_entry_hash,
ddmap_entry_eq, 0.6, tor_reallocarray, tor_free_);
static void
dircollator_add_routerstatus(dircollator_t *dc,
int vote_num,

View File

@ -47,3 +47,4 @@ struct dircollator_s {
#endif
#endif

View File

@ -4281,7 +4281,6 @@ typedef struct {
* XXXX Eventually, the default will be 0. */
int ExitRelay;
/** For how long (seconds) do we declare our singning keys to be valid? */
int SigningKeyLifetime;
/** For how long (seconds) do we declare our link keys to be valid? */

View File

@ -581,7 +581,8 @@ rend_config_services(const or_options_t *options, int validate_only)
10, 0, 1, &ok, NULL);
if (!ok) {
log_warn(LD_CONFIG,
"HiddenServiceMaxStreamsCloseCircuit should be 0 or 1, not %s",
"HiddenServiceMaxStreamsCloseCircuit should be 0 or 1, "
"not %s",
line->value);
rend_service_free(service);
return -1;

View File

@ -312,7 +312,8 @@ load_ed_keys(const or_options_t *options, time_t now)
check_signing_cert = signing_key_cert;
use_signing = master_signing_key;
} else {
char *fname = options_get_datadir_fname2(options, "keys", "ed25519_signing");
char *fname =
options_get_datadir_fname2(options, "keys", "ed25519_signing");
sign = ed_key_init_from_file(
fname,
INIT_ED_KEY_NEEDCERT|
@ -340,7 +341,8 @@ load_ed_keys(const or_options_t *options, time_t now)
if (! want_new_signing_key)
flags |= INIT_ED_KEY_OMIT_SECRET;
char *fname = options_get_datadir_fname2(options, "keys", "ed25519_master_id");
char *fname =
options_get_datadir_fname2(options, "keys", "ed25519_master_id");
id = ed_key_init_from_file(
fname,
flags,
@ -363,7 +365,8 @@ load_ed_keys(const or_options_t *options, time_t now)
INIT_ED_KEY_EXTRA_STRONG|
INIT_ED_KEY_NEEDCERT|
INIT_ED_KEY_INCLUDE_SIGNING_KEY_IN_CERT);
char *fname = options_get_datadir_fname2(options, "keys", "ed25519_signing");
char *fname =
options_get_datadir_fname2(options, "keys", "ed25519_signing");
sign = ed_key_init_from_file(fname,
flags, LOG_WARN,
sign_signing_key_with_id, now,

View File

@ -4921,7 +4921,8 @@ routerinfo_incompatible_with_extrainfo(const routerinfo_t *ri,
* digest256 was in the ri. */
digest256_matches = tor_memeq(ei->digest256,
ri->extra_info_digest256, DIGEST256_LEN);
digest256_matches |= tor_mem_is_zero(ri->extra_info_digest256, DIGEST256_LEN);
digest256_matches |=
tor_mem_is_zero(ri->extra_info_digest256, DIGEST256_LEN);
/* The identity must match exactly to have been generated at the same time
* by the same router. */

View File

@ -2352,7 +2352,8 @@ routerstatus_parse_entry_from_string(memarea_t *area,
if (!strcmp(t->args[0], "ed25519")) {
vote_rs->has_ed25519_listing = 1;
if (strcmp(t->args[1], "none") &&
digest256_from_base64((char*)vote_rs->ed25519_id, t->args[1])<0) {
digest256_from_base64((char*)vote_rs->ed25519_id,
t->args[1])<0) {
log_warn(LD_DIR, "Bogus ed25519 key in networkstatus vote");
goto err;
}
@ -3184,7 +3185,8 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out,
}
if (ns_type != NS_TYPE_CONSENSUS) {
digest256map_t *ed_id_map = digest256map_new();
SMARTLIST_FOREACH_BEGIN(ns->routerstatus_list, vote_routerstatus_t *, vrs) {
SMARTLIST_FOREACH_BEGIN(ns->routerstatus_list, vote_routerstatus_t *,
vrs) {
if (! vrs->has_ed25519_listing ||
tor_mem_is_zero((const char *)vrs->ed25519_id, DIGEST256_LEN))
continue;

View File

@ -282,3 +282,4 @@ tor_make_rsa_ed25519_crosscert(const ed25519_public_key_t *ed_key,
*cert = res;
return sz;
}

View File

@ -744,7 +744,6 @@ test_buffers_tls_read_mocked(void *arg)
next_reply_val[1] = 5000;
tt_int_op(6000, ==, read_to_buf_tls(NULL, 6000, buf));
done:
UNMOCK(tor_tls_read);
tor_free(mem);

View File

@ -210,8 +210,9 @@ test_hs_desc_event(void *arg)
/* test valid content. */
char *exp_msg;
control_event_hs_descriptor_content(rend_query.onion_address, STR_HS_CONTENT_DESC_ID,
HSDIR_EXIST_ID, hs_desc_content);
control_event_hs_descriptor_content(rend_query.onion_address,
STR_HS_CONTENT_DESC_ID, HSDIR_EXIST_ID,
hs_desc_content);
tor_asprintf(&exp_msg, "650+HS_DESC_CONTENT " STR_HS_ADDR " "\
STR_HS_CONTENT_DESC_ID " " STR_HSDIR_EXIST_LONGNAME\
"\r\n%s\r\n.\r\n650 OK\r\n", hs_desc_content);

View File

@ -197,7 +197,6 @@ typedef struct certs_data_s {
crypto_pk_t *key1, *key2;
} certs_data_t;
static int
recv_certs_cleanup(const struct testcase_t *test, void *obj)
{
@ -593,7 +592,6 @@ AUTHCHALLENGE_FAIL(truncated,
AUTHCHALLENGE_FAIL(nonzero_circid,
d->cell->circ_id = 1337)
static tor_x509_cert_t *mock_peer_cert = NULL;
static tor_x509_cert_t *
mock_get_peer_cert(tor_tls_t *tls)
@ -914,3 +912,4 @@ struct testcase_t link_handshake_tests[] = {
END_OF_TESTCASES
};