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;
287 end = tor_memstr(*s, eos-*s,
"\nrouter-signature");
289 end = tor_memstr(end, eos-end,
"\n-----END SIGNATURE-----\n");
291 end += strlen(
"\n-----END SIGNATURE-----\n");
298 if (have_extrainfo && want_extrainfo) {
305 signed_desc = &extrainfo->cache_info;
308 }
else if (!have_extrainfo && !want_extrainfo) {
313 prepend_annotations, &dl_again);
315 log_debug(
LD_DIR,
"Read router '%s', purpose '%s'",
318 signed_desc = &router->cache_info;
322 if (! elt && ! dl_again && have_raw_digest && invalid_digests_out) {
358 uint16_t port_min, port_max;
362 &a, &bits, &port_min,
363 &port_max) == AF_INET6 &&
365 port_min == port_max) {
369 *port_out = port_min;
373 } SMARTLIST_FOREACH_END(t);
401 int cache_copy,
int allow_annotations,
402 const char *prepend_annotations,
403 int *can_dl_again_out)
407 smartlist_t *tokens = NULL, *exit_policy_tokens = NULL;
410 const char *start_of_annotations, *cp, *s_dup = s;
411 size_t prepend_len = prepend_annotations ? strlen(prepend_annotations) : 0;
417 int can_dl_again = 0;
420 tor_assert(!allow_annotations || !prepend_annotations);
427 while (end > s+2 && *(end-1) ==
'\n' && *(end-2) ==
'\n')
432 if (prepend_annotations) {
435 log_warn(
LD_DIR,
"Error tokenizing router descriptor (annotations).");
440 start_of_annotations = s;
441 cp = tor_memstr(s, end-s,
"\nrouter ");
444 log_warn(
LD_DIR,
"No router keyword found.");
451 if (start_of_annotations != s) {
452 if (allow_annotations) {
455 log_warn(
LD_DIR,
"Error tokenizing router descriptor (annotations).");
459 log_warn(
LD_DIR,
"Found unexpected annotations on router descriptor not "
460 "loaded from disk. Dropping it.");
465 if (!tor_memstr(s, end-s,
"\nproto ")) {
466 log_debug(
LD_DIR,
"Found an obsolete router descriptor. "
467 "Rejecting quietly.");
472 log_warn(
LD_DIR,
"Couldn't compute router hash.");
477 if (allow_annotations)
478 flags |= TS_ANNOTATIONS_OK;
479 if (prepend_annotations)
480 flags |= TS_ANNOTATIONS_OK|TS_NO_NEW_ANNOTATIONS;
483 log_warn(
LD_DIR,
"Error tokenizing router descriptor.");
488 if (smartlist_len(tokens) < 2) {
489 log_warn(
LD_DIR,
"Impossibly short router descriptor.");
493 tok = find_by_keyword(tokens, K_ROUTER);
500 router->cache_info.
annotations_len = s-start_of_annotations + prepend_len;
507 if (prepend_annotations) {
508 memcpy(signed_body, prepend_annotations, prepend_len);
509 signed_body += prepend_len;
517 tor_assert(signed_body+(end-start_of_annotations) ==
519 memcpy(signed_body, start_of_annotations, end-start_of_annotations);
527 log_warn(
LD_DIR,
"Router nickname is invalid");
531 log_warn(
LD_DIR,
"Router address is not an IP address.");
536 router->ipv4_orport =
542 router->ipv4_dirport =
549 tok = find_by_keyword(tokens, K_BANDWIDTH);
555 log_warn(
LD_DIR,
"bandwidthrate %s unreadable or 0. Failing.",
581 router->cache_info.send_unencrypted =
599 tok = find_by_keyword(tokens, K_PUBLISHED);
608 "Relay's onion key had invalid exponent.");
613 crypto_pk_free(tok->
key);
620 log_warn(
LD_DIR,
"Bogus ntor-onion-key in routerinfo");
627 tok = find_by_keyword(tokens, K_SIGNING_KEY);
632 log_warn(
LD_DIR,
"Couldn't calculate key digest");
goto err;
638 ed_sig_tok = find_by_keyword(tokens, K_ROUTER_SIG_ED25519);
639 ed_cert_tok = find_by_keyword(tokens, K_IDENTITY_ED25519);
640 master_key_tok = find_by_keyword(tokens, K_MASTER_KEY_ED25519);
641 cc_ntor_tok = find_by_keyword(tokens, K_NTOR_ONION_KEY_CROSSCERT);
646 log_warn(
LD_DIR,
"Router descriptor had only one of (onion-key, "
647 "onion-key-crosscert).");
651 IF_BUG_ONCE(! (ed_sig_tok && ed_cert_tok&& cc_ntor_tok &&master_key_tok)) {
662 log_warn(
LD_DIR,
"Couldn't parse ed25519 cert");
668 if (cert->
cert_type != CERT_TYPE_ID_SIGNING ||
670 log_warn(
LD_DIR,
"Invalid form for ed25519 cert");
678 if (rsa_pubkey == NULL) {
679 log_warn(
LD_DIR,
"No pubkey for TAP cross-verification.");
682 if (strcmp(cc_tap_tok->
object_type,
"CROSSCERT")) {
683 log_warn(
LD_DIR,
"Wrong object type on onion-key-crosscert "
693 log_warn(
LD_DIR,
"Incorrect TAP cross-verification");
699 tor_assert(ed_sig_tok && ed_cert_tok && cc_ntor_tok);
700 const int ed_cert_token_pos =
smartlist_pos(tokens, ed_cert_tok);
701 if (ed_cert_token_pos == -1 || router_token_pos == -1 ||
702 (ed_cert_token_pos != router_token_pos + 1 &&
703 ed_cert_token_pos != router_token_pos - 1)) {
704 log_warn(
LD_DIR,
"Ed25519 certificate in wrong position");
707 if (ed_sig_tok != smartlist_get(tokens, smartlist_len(tokens)-2)) {
708 log_warn(
LD_DIR,
"Ed25519 signature in wrong position");
711 if (strcmp(ed_cert_tok->
object_type,
"ED25519 CERT")) {
712 log_warn(
LD_DIR,
"Wrong object type on identity-ed25519 "
716 if (strcmp(cc_ntor_tok->
object_type,
"ED25519 CERT")) {
717 log_warn(
LD_DIR,
"Wrong object type on ntor-onion-key-crosscert "
721 if (strcmp(cc_ntor_tok->
args[0],
"0") &&
722 strcmp(cc_ntor_tok->
args[0],
"1")) {
723 log_warn(
LD_DIR,
"Bad sign bit on ntor-onion-key-crosscert");
726 int ntor_cc_sign_bit = !strcmp(cc_ntor_tok->
args[0],
"1");
728 const char *signed_start, *signed_end;
730 if (master_key_tok) {
736 log_warn(
LD_DIR,
"Can't parse ed25519 master key");
742 log_warn(
LD_DIR,
"Ed25519 master key does not match "
743 "key in certificate");
750 log_warn(
LD_DIR,
"Couldn't parse ntor-onion-key-crosscert cert");
753 if (ntor_cc_cert->
cert_type != CERT_TYPE_ONION_ID ||
755 log_warn(
LD_DIR,
"Invalid contents for ntor-onion-key-crosscert cert");
762 ntor_cc_sign_bit)<0) {
763 log_warn(
LD_DIR,
"Error converting onion key to ed25519");
768 "\nrouter-sig-ed25519",
770 &signed_start, &signed_end) < 0) {
771 log_warn(
LD_DIR,
"Can't find ed25519-signed portion of descriptor");
776 strlen(ED_DESC_SIGNATURE_PREFIX));
784 time_t expires = TIME_MAX;
786 log_err(
LD_BUG,
"Couldn't create 'checkable' for cert.");
790 ntor_cc_cert, &ntor_cc_pk, &expires) < 0) {
791 log_err(
LD_BUG,
"Couldn't create 'checkable' for ntor_cc_cert.");
796 ed_sig_tok->
args[0])<0) {
797 log_warn(
LD_DIR,
"Couldn't decode ed25519 signature");
805 log_warn(
LD_DIR,
"Incorrect ed25519 signature(s)");
821 log_warn(
LD_DIR,
"Couldn't decode router fingerprint %s",
826 log_warn(
LD_DIR,
"Fingerprint '%s' does not match identity digest.",
833 const char *version = NULL, *protocols = NULL;
836 version = tok->
args[0];
841 protocols = tok->
args[0];
853 log_warn(
LD_DIR,
"Rejecting router with reject6/accept6 line: they crash "
861 &router->ipv6_orport);
862 smartlist_free(or_addresses);
866 if (!smartlist_len(exit_policy_tokens)) {
867 log_warn(
LD_DIR,
"No exit policy tokens in descriptor.");
872 log_warn(
LD_DIR,
"Error in exit policy");
893 for (i=0;i<tok->
n_args;++i) {
895 log_warn(
LD_DIR,
"Illegal nickname %s in family line",
905 time_t family_expiration = TIME_MAX;
907 if (family_cert_toks) {
912 smartlist_free(family_cert_toks);
929 log_warn(
LD_DIR,
"Invalid extra info digest");
938 log_warn(
LD_DIR,
"Invalid extra info digest256 %s",
951 router->ipv4_dirport > 0) {
955 tok = find_by_keyword(tokens, K_ROUTER_SIGNATURE);
957 if (!router->ipv4_orport) {
958 log_warn(
LD_DIR,
"or_port unreadable or 0. Failing.");
965 "router descriptor") < 0)
969 router->
platform = tor_strdup(
"<unknown>");
975 routerinfo_free(router);
978 crypto_pk_free(rsa_pubkey);
979 tor_cert_free(ntor_cc_cert);
982 smartlist_free(tokens);
984 smartlist_free(exit_policy_tokens);
986 DUMP_AREA(area,
"routerinfo");
989 if (can_dl_again_out)
990 *can_dl_again_out = can_dl_again;
1007 int cache_copy,
struct digest_ri_map_t *routermap,
1008 int *can_dl_again_out)
1017 const char *s_dup = s;
1020 int can_dl_again = 0;
1026 end = s + strlen(s);
1030 while (end > s+2 && *(end-1) ==
'\n' && *(end-2) ==
'\n')
1033 if (!tor_memstr(s, end-s,
"\nidentity-ed25519")) {
1034 log_debug(
LD_DIR,
"Found an obsolete extrainfo. Rejecting quietly.");
1039 log_warn(
LD_DIR,
"Couldn't compute router hash.");
1045 log_warn(
LD_DIR,
"Error tokenizing extra-info document.");
1049 if (smartlist_len(tokens) < 2) {
1050 log_warn(
LD_DIR,
"Impossibly short extra-info document.");
1055 tok = smartlist_get(tokens,0);
1056 if (tok->
tp != K_EXTRA_INFO) {
1057 log_warn(
LD_DIR,
"Entry does not start with \"extra-info\"");
1062 extrainfo->cache_info.is_extrainfo = 1;
1078 log_warn(
LD_DIR,
"Invalid fingerprint %s on \"extra-info\"",
1083 tok = find_by_keyword(tokens, K_PUBLISHED);
1085 log_warn(
LD_DIR,
"Invalid published time %s on \"extra-info\"",
1094 int n_ed_toks = !!ed_sig_tok + !!ed_cert_tok;
1095 if (n_ed_toks != 0 && n_ed_toks != 2) {
1096 log_warn(
LD_DIR,
"Router descriptor with only partial ed25519/"
1097 "cross-certification support");
1102 const int ed_cert_token_pos =
smartlist_pos(tokens, ed_cert_tok);
1103 if (ed_cert_token_pos != 1) {
1105 log_warn(
LD_DIR,
"Ed25519 certificate in wrong position");
1108 if (ed_sig_tok != smartlist_get(tokens, smartlist_len(tokens)-2)) {
1109 log_warn(
LD_DIR,
"Ed25519 signature in wrong position");
1112 if (strcmp(ed_cert_tok->
object_type,
"ED25519 CERT")) {
1113 log_warn(
LD_DIR,
"Wrong object type on identity-ed25519 "
1119 const char *signed_start, *signed_end;
1124 log_warn(
LD_DIR,
"Couldn't parse ed25519 cert");
1130 if (cert->
cert_type != CERT_TYPE_ID_SIGNING ||
1132 log_warn(
LD_DIR,
"Invalid form for ed25519 cert");
1137 "\nrouter-sig-ed25519",
1139 &signed_start, &signed_end) < 0) {
1140 log_warn(
LD_DIR,
"Can't find ed25519-signed portion of extrainfo");
1145 strlen(ED_DESC_SIGNATURE_PREFIX));
1153 log_err(
LD_BUG,
"Couldn't create 'checkable' for cert.");
1158 ed_sig_tok->
args[0])<0) {
1159 log_warn(
LD_DIR,
"Couldn't decode ed25519 signature");
1163 check[1].msg = d256;
1167 log_warn(
LD_DIR,
"Incorrect ed25519 signature(s)");
1179 (router = digestmap_get((digestmap_t*)routermap,
1184 tok = find_by_keyword(tokens, K_ROUTER_SIGNATURE);
1187 log_warn(
LD_DIR,
"Bad object type or length on extra-info signature");
1197 extrainfo->cache_info.send_unencrypted =
1198 router->cache_info.send_unencrypted;
1207 dump_desc(s_dup,
"extra-info descriptor");
1208 extrainfo_free(extrainfo);
1213 smartlist_free(tokens);
1216 DUMP_AREA(area,
"extrainfo");
1219 if (can_dl_again_out)
1220 *can_dl_again_out = can_dl_again;
1241 if (((tok->
tp == K_ACCEPT6 || tok->
tp == K_REJECT6) &&
1244 ((tok->
tp == K_ACCEPT || tok->
tp == K_REJECT) &&
1248 log_warn(
LD_DIR,
"Mismatch between field type and address type in exit "
1249 "policy '%s'. Discarding entire router descriptor.",
1251 addr_policy_free(newe);
1268 if (t->tp == K_ACCEPT || t->tp == K_ACCEPT6 ||
1269 t->tp == K_REJECT || t->tp == K_REJECT6)
1281 size_t cert_body_size,
1283 char **family_id_out,
1284 time_t *family_expiration_out)
1293 if (cert->
cert_type != CERT_TYPE_FAMILY_V_IDENTITY) {
1294 log_warn(
LD_DIR,
"Wrong cert type in family certificate.");
1298 log_warn(
LD_DIR,
"Missing family key in family certificate.");
1302 log_warn(
LD_DIR,
"Key mismatch in family certificate.");
1313 log_warn(
LD_DIR,
"Invalid signature in family certificate");
1319 *family_expiration_out = valid_until;
1327 tor_cert_free(cert);
1343 time_t *family_expiration_out)
1345 if (BUG(!identity_key) ||
1346 BUG(!family_ids_out) ||
1347 BUG(!family_expiration_out))
1350 *family_expiration_out = TIME_MAX;
1352 if (family_cert_tokens == NULL || smartlist_len(family_cert_tokens) == 0) {
1353 *family_ids_out = NULL;
1359 if (BUG(tok->object_body == NULL))
1362 char *this_id = NULL;
1363 time_t this_expiration = TIME_MAX;
1367 &this_id, &this_expiration) < 0)
1370 *family_expiration_out = MIN(*family_expiration_out, this_expiration);
1371 } SMARTLIST_FOREACH_END(tok);
1379 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