53#define ROUTERDESC_TOKEN_TABLE_PRIVATE
54#define ROUTERPARSE_PRIVATE
95 T1(
"ntor-onion-key", K_ONION_KEY_NTOR,
GE(1),
NO_OBJ ),
106 T01(
"extra-info-digest", K_EXTRA_INFO_DIGEST,
GE(1),
NO_OBJ ),
109 T1(
"master-key-ed25519", K_MASTER_KEY_ED25519,
GE(1),
NO_OBJ ),
110 T1(
"router-sig-ed25519", K_ROUTER_SIG_ED25519,
GE(1),
NO_OBJ ),
112 T1(
"ntor-onion-key-crosscert", K_NTOR_ONION_KEY_CROSSCERT,
123 T1(
"bandwidth", K_BANDWIDTH,
GE(3),
NO_OBJ ),
137 T1(
"router-sig-ed25519", K_ROUTER_SIG_ED25519,
GE(1),
NO_OBJ ),
152 T01(
"dirreq-v2-tunneled-dl", K_DIRREQ_V2_TUN,
ARGS,
NO_OBJ ),
153 T01(
"dirreq-v3-tunneled-dl", K_DIRREQ_V3_TUN,
ARGS,
NO_OBJ ),
157 T01(
"cell-processed-cells", K_CELL_PROCESSED,
ARGS,
NO_OBJ ),
160 T01(
"cell-circuits-per-decile", K_CELL_CIRCS,
ARGS,
NO_OBJ ),
162 T01(
"exit-kibibytes-written", K_EXIT_WRITTEN,
ARGS,
NO_OBJ ),
180 time_t *family_expiration_out);
189 "router ",
"\nrouter-signature",
'\n',
199 "\nrouter-signature",
'\n', DIGEST_SHA1);
210 int *is_extrainfo_out)
212 const char *annotations = NULL;
213 const char *s = *s_ptr;
221 if (*s ==
'@' && !annotations) {
223 }
else if (*s ==
'r' && !
strcmpstart(s,
"router ")) {
224 *s_ptr = annotations ? annotations : s;
225 *is_extrainfo_out = 0;
227 }
else if (*s ==
'e' && !
strcmpstart(s,
"extra-info ")) {
228 *s_ptr = annotations ? annotations : s;
229 *is_extrainfo_out = 1;
233 if (!(s = memchr(s+1,
'\n', eos-(s+1))))
259 int allow_annotations,
260 const char *prepend_annotations,
267 const char *end, *start;
276 eos = *s + strlen(*s);
282 int have_raw_digest = 0;
286 bool digest_covers_whole_input =
false;
291 end = tor_memstr(*s, eos-*s,
"\nrouter-signature");
293 end = tor_memstr(end, eos-end,
"\n-----END SIGNATURE-----\n");
295 end += strlen(
"\n-----END SIGNATURE-----\n");
302 if (have_extrainfo && want_extrainfo) {
305 digest_covers_whole_input = fast_memeqstart(*s, end-*s,
"extra-info ");
310 signed_desc = &extrainfo->cache_info;
313 }
else if (!have_extrainfo && !want_extrainfo) {
315 digest_covers_whole_input = fast_memeqstart(*s, end-*s,
"router ");
319 prepend_annotations, &dl_again);
321 log_debug(
LD_DIR,
"Read router '%s', purpose '%s'",
324 signed_desc = &router->cache_info;
328 if (! elt && ! dl_again && have_raw_digest && digest_covers_whole_input &&
329 invalid_digests_out) {
365 uint16_t port_min, port_max;
369 &a, &bits, &port_min,
370 &port_max) == AF_INET6 &&
372 port_min == port_max) {
376 *port_out = port_min;
380 } SMARTLIST_FOREACH_END(t);
408 int cache_copy,
int allow_annotations,
409 const char *prepend_annotations,
410 int *can_dl_again_out)
414 smartlist_t *tokens = NULL, *exit_policy_tokens = NULL;
417 const char *start_of_annotations, *cp, *s_dup = s;
418 size_t prepend_len = prepend_annotations ? strlen(prepend_annotations) : 0;
424 int can_dl_again = 0;
427 tor_assert(!allow_annotations || !prepend_annotations);
434 while (end > s+2 && *(end-1) ==
'\n' && *(end-2) ==
'\n')
439 if (prepend_annotations) {
442 log_warn(
LD_DIR,
"Error tokenizing router descriptor (annotations).");
447 start_of_annotations = s;
448 cp = tor_memstr(s, end-s,
"\nrouter ");
451 log_warn(
LD_DIR,
"No router keyword found.");
458 if (start_of_annotations != s) {
459 if (allow_annotations) {
462 log_warn(
LD_DIR,
"Error tokenizing router descriptor (annotations).");
466 log_warn(
LD_DIR,
"Found unexpected annotations on router descriptor not "
467 "loaded from disk. Dropping it.");
472 if (!tor_memstr(s, end-s,
"\nproto ")) {
473 log_debug(
LD_DIR,
"Found an obsolete router descriptor. "
474 "Rejecting quietly.");
479 log_warn(
LD_DIR,
"Couldn't compute router hash.");
484 if (allow_annotations)
485 flags |= TS_ANNOTATIONS_OK;
486 if (prepend_annotations)
487 flags |= TS_ANNOTATIONS_OK|TS_NO_NEW_ANNOTATIONS;
490 log_warn(
LD_DIR,
"Error tokenizing router descriptor.");
495 if (smartlist_len(tokens) < 2) {
496 log_warn(
LD_DIR,
"Impossibly short router descriptor.");
500 tok = find_by_keyword(tokens, K_ROUTER);
507 router->cache_info.
annotations_len = s-start_of_annotations + prepend_len;
514 if (prepend_annotations) {
515 memcpy(signed_body, prepend_annotations, prepend_len);
516 signed_body += prepend_len;
524 tor_assert(signed_body+(end-start_of_annotations) ==
526 memcpy(signed_body, start_of_annotations, end-start_of_annotations);
534 log_warn(
LD_DIR,
"Router nickname is invalid");
538 log_warn(
LD_DIR,
"Router address is not an IP address.");
543 router->ipv4_orport =
549 router->ipv4_dirport =
556 tok = find_by_keyword(tokens, K_BANDWIDTH);
562 log_warn(
LD_DIR,
"bandwidthrate %s unreadable or 0. Failing.",
588 router->cache_info.send_unencrypted =
606 tok = find_by_keyword(tokens, K_PUBLISHED);
615 "Relay's onion key had invalid exponent.");
620 crypto_pk_free(tok->
key);
627 log_warn(
LD_DIR,
"Bogus ntor-onion-key in routerinfo");
634 tok = find_by_keyword(tokens, K_SIGNING_KEY);
639 log_warn(
LD_DIR,
"Couldn't calculate key digest");
goto err;
645 ed_sig_tok = find_by_keyword(tokens, K_ROUTER_SIG_ED25519);
646 ed_cert_tok = find_by_keyword(tokens, K_IDENTITY_ED25519);
647 master_key_tok = find_by_keyword(tokens, K_MASTER_KEY_ED25519);
648 cc_ntor_tok = find_by_keyword(tokens, K_NTOR_ONION_KEY_CROSSCERT);
653 log_warn(
LD_DIR,
"Router descriptor had only one of (onion-key, "
654 "onion-key-crosscert).");
658 IF_BUG_ONCE(! (ed_sig_tok && ed_cert_tok&& cc_ntor_tok &&master_key_tok)) {
669 log_warn(
LD_DIR,
"Couldn't parse ed25519 cert");
675 if (cert->
cert_type != CERT_TYPE_ID_SIGNING ||
677 log_warn(
LD_DIR,
"Invalid form for ed25519 cert");
685 if (rsa_pubkey == NULL) {
686 log_warn(
LD_DIR,
"No pubkey for TAP cross-verification.");
689 if (strcmp(cc_tap_tok->
object_type,
"CROSSCERT")) {
690 log_warn(
LD_DIR,
"Wrong object type on onion-key-crosscert "
700 log_warn(
LD_DIR,
"Incorrect TAP cross-verification");
706 tor_assert(ed_sig_tok && ed_cert_tok && cc_ntor_tok);
707 const int ed_cert_token_pos =
smartlist_pos(tokens, ed_cert_tok);
708 if (ed_cert_token_pos == -1 || router_token_pos == -1 ||
709 (ed_cert_token_pos != router_token_pos + 1 &&
710 ed_cert_token_pos != router_token_pos - 1)) {
711 log_warn(
LD_DIR,
"Ed25519 certificate in wrong position");
714 if (ed_sig_tok != smartlist_get(tokens, smartlist_len(tokens)-2)) {
715 log_warn(
LD_DIR,
"Ed25519 signature in wrong position");
718 if (strcmp(ed_cert_tok->
object_type,
"ED25519 CERT")) {
719 log_warn(
LD_DIR,
"Wrong object type on identity-ed25519 "
723 if (strcmp(cc_ntor_tok->
object_type,
"ED25519 CERT")) {
724 log_warn(
LD_DIR,
"Wrong object type on ntor-onion-key-crosscert "
728 if (strcmp(cc_ntor_tok->
args[0],
"0") &&
729 strcmp(cc_ntor_tok->
args[0],
"1")) {
730 log_warn(
LD_DIR,
"Bad sign bit on ntor-onion-key-crosscert");
733 int ntor_cc_sign_bit = !strcmp(cc_ntor_tok->
args[0],
"1");
735 const char *signed_start, *signed_end;
737 if (master_key_tok) {
743 log_warn(
LD_DIR,
"Can't parse ed25519 master key");
749 log_warn(
LD_DIR,
"Ed25519 master key does not match "
750 "key in certificate");
757 log_warn(
LD_DIR,
"Couldn't parse ntor-onion-key-crosscert cert");
760 if (ntor_cc_cert->
cert_type != CERT_TYPE_ONION_ID ||
762 log_warn(
LD_DIR,
"Invalid contents for ntor-onion-key-crosscert cert");
769 ntor_cc_sign_bit)<0) {
770 log_warn(
LD_DIR,
"Error converting onion key to ed25519");
775 "\nrouter-sig-ed25519",
777 &signed_start, &signed_end) < 0) {
778 log_warn(
LD_DIR,
"Can't find ed25519-signed portion of descriptor");
783 strlen(ED_DESC_SIGNATURE_PREFIX));
791 time_t expires = TIME_MAX;
793 log_err(
LD_BUG,
"Couldn't create 'checkable' for cert.");
797 ntor_cc_cert, &ntor_cc_pk, &expires) < 0) {
798 log_err(
LD_BUG,
"Couldn't create 'checkable' for ntor_cc_cert.");
803 ed_sig_tok->
args[0])<0) {
804 log_warn(
LD_DIR,
"Couldn't decode ed25519 signature");
812 log_warn(
LD_DIR,
"Incorrect ed25519 signature(s)");
828 log_warn(
LD_DIR,
"Couldn't decode router fingerprint %s",
833 log_warn(
LD_DIR,
"Fingerprint '%s' does not match identity digest.",
840 const char *version = NULL, *protocols = NULL;
843 version = tok->
args[0];
848 protocols = tok->
args[0];
860 log_warn(
LD_DIR,
"Rejecting router with reject6/accept6 line: they crash "
868 &router->ipv6_orport);
869 smartlist_free(or_addresses);
873 if (!smartlist_len(exit_policy_tokens)) {
874 log_warn(
LD_DIR,
"No exit policy tokens in descriptor.");
879 log_warn(
LD_DIR,
"Error in exit policy");
900 for (i=0;i<tok->
n_args;++i) {
902 log_warn(
LD_DIR,
"Illegal nickname %s in family line",
912 time_t family_expiration = TIME_MAX;
914 if (family_cert_toks) {
919 smartlist_free(family_cert_toks);
936 log_warn(
LD_DIR,
"Invalid extra info digest");
945 log_warn(
LD_DIR,
"Invalid extra info digest256 %s",
958 router->ipv4_dirport > 0) {
962 tok = find_by_keyword(tokens, K_ROUTER_SIGNATURE);
964 if (!router->ipv4_orport) {
965 log_warn(
LD_DIR,
"or_port unreadable or 0. Failing.");
972 "router descriptor") < 0)
976 router->
platform = tor_strdup(
"<unknown>");
982 routerinfo_free(router);
985 crypto_pk_free(rsa_pubkey);
986 tor_cert_free(ntor_cc_cert);
989 smartlist_free(tokens);
991 smartlist_free(exit_policy_tokens);
993 DUMP_AREA(area,
"routerinfo");
996 if (can_dl_again_out)
997 *can_dl_again_out = can_dl_again;
1014 int cache_copy,
struct digest_ri_map_t *routermap,
1015 int *can_dl_again_out)
1024 const char *s_dup = s;
1027 int can_dl_again = 0;
1033 end = s + strlen(s);
1037 while (end > s+2 && *(end-1) ==
'\n' && *(end-2) ==
'\n')
1040 if (!tor_memstr(s, end-s,
"\nidentity-ed25519")) {
1041 log_debug(
LD_DIR,
"Found an obsolete extrainfo. Rejecting quietly.");
1046 log_warn(
LD_DIR,
"Couldn't compute router hash.");
1052 log_warn(
LD_DIR,
"Error tokenizing extra-info document.");
1056 if (smartlist_len(tokens) < 2) {
1057 log_warn(
LD_DIR,
"Impossibly short extra-info document.");
1062 tok = smartlist_get(tokens,0);
1063 if (tok->
tp != K_EXTRA_INFO) {
1064 log_warn(
LD_DIR,
"Entry does not start with \"extra-info\"");
1069 extrainfo->cache_info.is_extrainfo = 1;
1085 log_warn(
LD_DIR,
"Invalid fingerprint %s on \"extra-info\"",
1090 tok = find_by_keyword(tokens, K_PUBLISHED);
1092 log_warn(
LD_DIR,
"Invalid published time %s on \"extra-info\"",
1101 int n_ed_toks = !!ed_sig_tok + !!ed_cert_tok;
1102 if (n_ed_toks != 0 && n_ed_toks != 2) {
1103 log_warn(
LD_DIR,
"Router descriptor with only partial ed25519/"
1104 "cross-certification support");
1109 const int ed_cert_token_pos =
smartlist_pos(tokens, ed_cert_tok);
1110 if (ed_cert_token_pos != 1) {
1112 log_warn(
LD_DIR,
"Ed25519 certificate in wrong position");
1115 if (ed_sig_tok != smartlist_get(tokens, smartlist_len(tokens)-2)) {
1116 log_warn(
LD_DIR,
"Ed25519 signature in wrong position");
1119 if (strcmp(ed_cert_tok->
object_type,
"ED25519 CERT")) {
1120 log_warn(
LD_DIR,
"Wrong object type on identity-ed25519 "
1126 const char *signed_start, *signed_end;
1131 log_warn(
LD_DIR,
"Couldn't parse ed25519 cert");
1137 if (cert->
cert_type != CERT_TYPE_ID_SIGNING ||
1139 log_warn(
LD_DIR,
"Invalid form for ed25519 cert");
1144 "\nrouter-sig-ed25519",
1146 &signed_start, &signed_end) < 0) {
1147 log_warn(
LD_DIR,
"Can't find ed25519-signed portion of extrainfo");
1152 strlen(ED_DESC_SIGNATURE_PREFIX));
1160 log_err(
LD_BUG,
"Couldn't create 'checkable' for cert.");
1165 ed_sig_tok->
args[0])<0) {
1166 log_warn(
LD_DIR,
"Couldn't decode ed25519 signature");
1170 check[1].msg = d256;
1174 log_warn(
LD_DIR,
"Incorrect ed25519 signature(s)");
1186 (router = digestmap_get((digestmap_t*)routermap,
1191 tok = find_by_keyword(tokens, K_ROUTER_SIGNATURE);
1194 log_warn(
LD_DIR,
"Bad object type or length on extra-info signature");
1204 extrainfo->cache_info.send_unencrypted =
1205 router->cache_info.send_unencrypted;
1214 dump_desc(s_dup,
"extra-info descriptor");
1215 extrainfo_free(extrainfo);
1220 smartlist_free(tokens);
1223 DUMP_AREA(area,
"extrainfo");
1226 if (can_dl_again_out)
1227 *can_dl_again_out = can_dl_again;
1248 if (((tok->
tp == K_ACCEPT6 || tok->
tp == K_REJECT6) &&
1251 ((tok->
tp == K_ACCEPT || tok->
tp == K_REJECT) &&
1255 log_warn(
LD_DIR,
"Mismatch between field type and address type in exit "
1256 "policy '%s'. Discarding entire router descriptor.",
1258 addr_policy_free(newe);
1275 if (t->tp == K_ACCEPT || t->tp == K_ACCEPT6 ||
1276 t->tp == K_REJECT || t->tp == K_REJECT6)
1288 size_t cert_body_size,
1290 char **family_id_out,
1291 time_t *family_expiration_out)
1300 if (cert->
cert_type != CERT_TYPE_FAMILY_V_IDENTITY) {
1301 log_warn(
LD_DIR,
"Wrong cert type in family certificate.");
1305 log_warn(
LD_DIR,
"Missing family key in family certificate.");
1309 log_warn(
LD_DIR,
"Key mismatch in family certificate.");
1320 log_warn(
LD_DIR,
"Invalid signature in family certificate");
1326 *family_expiration_out = valid_until;
1334 tor_cert_free(cert);
1350 time_t *family_expiration_out)
1352 if (BUG(!identity_key) ||
1353 BUG(!family_ids_out) ||
1354 BUG(!family_expiration_out))
1357 *family_expiration_out = TIME_MAX;
1359 if (family_cert_tokens == NULL || smartlist_len(family_cert_tokens) == 0) {
1360 *family_ids_out = NULL;
1366 if (BUG(tok->object_body == NULL))
1369 char *this_id = NULL;
1370 time_t this_expiration = TIME_MAX;
1374 &this_id, &this_expiration) < 0)
1377 *family_expiration_out = MIN(*family_expiration_out, this_expiration);
1378 } SMARTLIST_FOREACH_END(tok);
1386 smartlist_free(*family_ids_out);
Address policy structures.
void tor_addr_copy(tor_addr_t *dest, const tor_addr_t *src)
int tor_addr_parse_mask_ports(const char *s, unsigned flags, tor_addr_t *addr_out, maskbits_t *maskbits_out, uint16_t *port_min_out, uint16_t *port_max_out)
static sa_family_t tor_addr_family(const tor_addr_t *a)
#define tor_addr_from_in(dest, in)
int base16_decode(char *dest, size_t destlen, const char *src, size_t srclen)
const or_options_t * get_options(void)
Header file for config.c.
Header for crypto_curve25519.c.
int curve25519_public_from_base64(curve25519_public_key_t *pkey, const char *input)
int crypto_digest256(char *digest, const char *m, size_t len, digest_algorithm_t algorithm)
void crypto_digest_get_digest(crypto_digest_t *digest, char *out, size_t out_len)
#define crypto_digest_free(d)
crypto_digest_t * crypto_digest256_new(digest_algorithm_t algorithm)
void crypto_digest_add_bytes(crypto_digest_t *digest, const char *data, size_t len)
int ed25519_checksig_batch(int *okay_out, const ed25519_checkable_t *checkable, int n_checkable)
int ed25519_public_key_from_curve25519_public_key(ed25519_public_key_t *pubkey, const curve25519_public_key_t *pubkey_in, int signbit)
int ed25519_pubkey_eq(const ed25519_public_key_t *key1, const ed25519_public_key_t *key2)
Header for crypto_ed25519.c.
int crypto_pk_get_digest(const crypto_pk_t *pk, char *digest_out)
int crypto_pk_public_exponent_ok(const crypto_pk_t *env)
const char * router_describe(const routerinfo_t *ri)
Header file for describe.c.
#define tor_memneq(a, b, sz)
#define fast_memneq(a, b, c)
const char * escaped(const char *s)
int tor_inet_aton(const char *str, struct in_addr *addr)
memarea_t * memarea_new(void)
#define memarea_drop_all(area)
int is_legal_nickname(const char *s)
int is_legal_nickname_or_hexdigest(const char *s)
Header file for nickname.c.
Master header file for Tor-specific functionality.
long tor_parse_long(const char *s, int base, long min, long max, int *ok, char **next)
void token_clear(directory_token_t *tok)
smartlist_t * find_all_by_keyword(const smartlist_t *s, directory_keyword k)
int tokenize_string(memarea_t *area, const char *start, const char *end, smartlist_t *out, const token_rule_t *table, int flags)
directory_token_t * find_opt_by_keyword(const smartlist_t *s, directory_keyword keyword)
Header file for parsecommon.c.
#define T1_END(s, t, a, o)
#define T1_START(s, t, a, o)
void policy_expand_private(smartlist_t **policy)
int policy_is_reject_star(const smartlist_t *policy, sa_family_t family, int default_reject)
short_policy_t * parse_short_policy(const char *summary)
int short_policy_is_reject_star(const short_policy_t *policy)
Header file for policies.c.
addr_policy_t * router_parse_addr_policy(directory_token_t *tok, unsigned fmt_flags)
Header file for policy_parse.c.
int tor_asprintf(char **strp, const char *fmt,...)
Header file for router.c.
const char * router_purpose_to_string(uint8_t p)
uint8_t router_purpose_from_string(const char *s)
Header file for routerinfo.c.
Router descriptor structure.
#define ROUTER_PURPOSE_UNKNOWN
#define ROUTER_PURPOSE_GENERAL
routerlist_t * router_get_routerlist(void)
Header file for routerlist.c.
Router descriptor list structure.
int router_parse_list_from_string(const char **s, const char *eos, smartlist_t *dest, saved_location_t saved_location, int want_extrainfo, int allow_annotations, const char *prepend_annotations, smartlist_t *invalid_digests_out)
routerinfo_t * router_parse_entry_from_string(const char *s, const char *end, int cache_copy, int allow_annotations, const char *prepend_annotations, int *can_dl_again_out)
static int check_family_certs(const smartlist_t *family_cert_tokens, const ed25519_public_key_t *identity_key, smartlist_t **family_ids_out, time_t *family_expiration_out)
int router_get_extrainfo_hash(const char *s, size_t s_len, char *digest)
static smartlist_t * find_all_exitpolicy(smartlist_t *s)
STATIC int check_one_family_cert(const uint8_t *cert_body, size_t cert_body_size, const ed25519_public_key_t *identity_key, char **family_id_out, time_t *family_expiration_out)
static int find_start_of_next_router_or_extrainfo(const char **s_ptr, const char *eos, int *is_extrainfo_out)
extrainfo_t * extrainfo_parse_entry_from_string(const char *s, const char *end, int cache_copy, struct digest_ri_map_t *routermap, int *can_dl_again_out)
int router_get_router_hash(const char *s, size_t s_len, char *digest)
void routerparse_free_all(void)
void routerparse_init(void)
int find_single_ipv6_orport(const smartlist_t *list, tor_addr_t *addr_out, uint16_t *port_out)
const token_rule_t routerdesc_token_table[]
static int router_add_exit_policy(routerinfo_t *router, directory_token_t *tok)
static token_rule_t extrainfo_token_table[]
Header file for routerparse.c.
int sandbox_is_active(void)
Header file for sandbox.c.
int check_signature_token(const char *digest, ssize_t digest_len, directory_token_t *tok, crypto_pk_t *pkey, int flags, const char *doctype)
int router_get_hash_impl_helper(const char *s, size_t s_len, const char *start_str, const char *end_str, char end_c, int log_severity, const char **start_out, const char **end_out)
int router_get_hash_impl(const char *s, size_t s_len, char *digest, const char *start_str, const char *end_str, char end_c, digest_algorithm_t alg)
Header file for sigcommon.c.
int smartlist_pos(const smartlist_t *sl, const void *element)
void smartlist_uniq_strings(smartlist_t *sl)
void smartlist_sort_strings(smartlist_t *sl)
void smartlist_add_strdup(struct smartlist_t *sl, const char *string)
smartlist_t * smartlist_new(void)
void smartlist_add(smartlist_t *sl, void *element)
#define SMARTLIST_FOREACH_BEGIN(sl, type, var)
#define SMARTLIST_FOREACH(sl, type, var, cmd)
unsigned int allow_single_hop_exits
unsigned int caches_extra_info
protover_summary_flags_t pv
smartlist_t * exit_policy
smartlist_t * declared_family
crypto_pk_t * identity_pkey
size_t tap_onion_pkey_len
struct curve25519_public_key_t * onion_curve25519_pkey
unsigned int wants_to_be_hs_dir
struct smartlist_t * family_ids
unsigned int is_hibernating
unsigned int policy_is_reject_star
unsigned int supports_tunnelled_dir_requests
uint32_t bandwidthcapacity
time_t cert_expiration_time
struct short_policy_t * ipv6_exit_policy
struct digest_ri_map_t * identity_map
char signed_descriptor_digest[DIGEST_LEN]
char extra_info_digest[DIGEST_LEN]
char identity_digest[DIGEST_LEN]
struct tor_cert_st * signing_key_cert
char * signed_descriptor_body
char extra_info_digest256[DIGEST256_LEN]
size_t signed_descriptor_len
saved_location_t saved_location
ed25519_public_key_t signing_key
ed25519_public_key_t signed_key
unsigned signing_key_included
int parse_iso_time(const char *cp, time_t *t)
int tor_cert_checksig(tor_cert_t *cert, const ed25519_public_key_t *pubkey, time_t now)
int tor_cert_get_checkable_sig(ed25519_checkable_t *checkable_out, const tor_cert_t *cert, const ed25519_public_key_t *pubkey, time_t *expiration_out)
int check_tap_onion_key_crosscert(const uint8_t *crosscert, int crosscert_len, const crypto_pk_t *onion_pkey, const ed25519_public_key_t *master_id_pkey, const uint8_t *rsa_id_digest)
tor_cert_t * tor_cert_parse(const uint8_t *encoded, const size_t len)
void dump_desc_fifo_cleanup(void)
void dump_desc(const char *desc, const char *type)
void dump_desc_init(void)
Header file for unparseable.c.
#define IF_BUG_ONCE(cond)
int strcmpstart(const char *s1, const char *s2)
const char * eat_whitespace_eos(const char *s, const char *eos)
void tor_strstrip(char *s, const char *strip)
void summarize_protover_flags(protover_summary_flags_t *out, const char *protocols, const char *version)
Header file for versions.c.
#define ED25519_BASE64_LEN
#define ED25519_PUBKEY_LEN