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,
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);
goto done;
}
-done:
+ done:
auth_challenge_cell_free(ac);
#undef ERR
} SMARTLIST_FOREACH_END(fingerprint);
}
-end:
+ end:
return desc_id;
}
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,
* 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? */
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;
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|
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,
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,
* 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. */
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;
}
}
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;
*cert = res;
return sz;
}
+
next_reply_val[1] = 5000;
tt_int_op(6000, ==, read_to_buf_tls(NULL, 6000, buf));
-
done:
UNMOCK(tor_tls_read);
tor_free(mem);
/* 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);
crypto_pk_t *key1, *key2;
} certs_data_t;
-
static int
recv_certs_cleanup(const struct testcase_t *test, void *obj)
{
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)
END_OF_TESTCASES
};
+