whitespace fixes

This commit is contained in:
Nick Mathewson 2016-05-17 20:08:03 -04:00
parent ab932cd7bf
commit 2729f166cb
4 changed files with 17 additions and 13 deletions

View File

@ -261,7 +261,7 @@ dirserv_router_get_status(const routerinfo_t *router, const char **msg,
/* This has an ed25519 identity key. */
if (KEYPIN_MISMATCH ==
keypin_check((const uint8_t*)router->cache_info.identity_digest,
router->cache_info.signing_key_cert->signing_key.pubkey)) {
router->cache_info.signing_key_cert->signing_key.pubkey)) {
log_fn(severity, LD_DIR,
"Descriptor from router %s has an Ed25519 key, "
"but the <rsa,ed25519> keys don't match what they were before.",
@ -2898,7 +2898,8 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
listbadexits);
if (ri->cache_info.signing_key_cert) {
memcpy(vrs->ed25519_id, ri->cache_info.signing_key_cert->signing_key.pubkey,
memcpy(vrs->ed25519_id,
ri->cache_info.signing_key_cert->signing_key.pubkey,
ED25519_PUBKEY_LEN);
}

View File

@ -2036,7 +2036,8 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e)
routerinfo_free(ri);
return -1;
}
ri->cache_info.signing_key_cert = tor_cert_dup(get_master_signing_key_cert());
ri->cache_info.signing_key_cert =
tor_cert_dup(get_master_signing_key_cert());
get_platform_str(platform, sizeof(platform));
ri->platform = tor_strdup(platform);
@ -2560,9 +2561,9 @@ router_dump_router_to_string(routerinfo_t *router,
char ed_cert_base64[256];
char ed_fp_base64[ED25519_BASE64_LEN+1];
if (base64_encode(ed_cert_base64, sizeof(ed_cert_base64),
(const char*)router->cache_info.signing_key_cert->encoded,
router->cache_info.signing_key_cert->encoded_len,
BASE64_ENCODE_MULTILINE) < 0) {
(const char*)router->cache_info.signing_key_cert->encoded,
router->cache_info.signing_key_cert->encoded_len,
BASE64_ENCODE_MULTILINE) < 0) {
log_err(LD_BUG,"Couldn't base64-encode signing key certificate!");
goto err;
}
@ -2600,9 +2601,9 @@ router_dump_router_to_string(routerinfo_t *router,
int tap_cc_len = 0;
uint8_t *tap_cc =
make_tap_onion_key_crosscert(tap_key,
&router->cache_info.signing_key_cert->signing_key,
router->identity_pkey,
&tap_cc_len);
&router->cache_info.signing_key_cert->signing_key,
router->identity_pkey,
&tap_cc_len);
if (!tap_cc) {
log_warn(LD_BUG,"make_tap_onion_key_crosscert failed!");
goto err;

View File

@ -5215,7 +5215,8 @@ routerinfo_incompatible_with_extrainfo(const crypto_pk_t *identity_pkey,
goto err; /* different servers */
}
if (! tor_cert_opt_eq(sd->signing_key_cert,ei->cache_info.signing_key_cert)) {
if (! tor_cert_opt_eq(sd->signing_key_cert,
ei->cache_info.signing_key_cert)) {
if (msg) *msg = "Extrainfo signing key cert didn't match routerinfo";
goto err; /* different servers */
}

View File

@ -1405,7 +1405,8 @@ router_parse_entry_from_string(const char *s, const char *end,
log_warn(LD_DIR, "Couldn't parse ed25519 cert");
goto err;
}
router->cache_info.signing_key_cert = cert; /* makes sure it gets freed.*/
/* makes sure it gets freed. */
router->cache_info.signing_key_cert = cert;
if (cert->cert_type != CERT_TYPE_ID_SIGNING ||
! cert->signing_key_included) {
@ -1600,8 +1601,8 @@ router_parse_entry_from_string(const char *s, const char *end,
}
if (tok->n_args >= 2) {
if (digest256_from_base64(router->cache_info.extra_info_digest256, tok->args[1])
< 0) {
if (digest256_from_base64(router->cache_info.extra_info_digest256,
tok->args[1]) < 0) {
log_warn(LD_DIR, "Invalid extra info digest256 %s",
escaped(tok->args[1]));
}