- tor-gencert creates all files as readable to the file creator only, and
write-protects the authority identity key.
+ o Minor features (directory authority):
+ - Fail quickly and (relatively) harmlessly if we generate a network
+ status document that is somehow malformed.
+
o Deprecated features:
- RedirectExits is now deprecated.
note_crypto_pk_op(SIGN_DIR);
if (router_append_dirobj_signature(outp,endp-outp,digest,private_key)<0) {
- log_warn(LD_BUG, "Unable to sign router status.");
+ log_warn(LD_BUG, "Unable to sign networkstatus vote.");
goto err;
}
+ {
+ networkstatus_vote_t *v;
+ if (!(v = networkstatus_parse_vote_from_string(status, 1))) {
+ log_err(LD_BUG,"Generated a networkstatus vote we couldn't parse.");
+ goto err;
+ }
+ networkstatus_vote_free(v);
+ }
+
goto done;
err:
goto done;
}
+ {
+ networkstatus_t *ns;
+ if (!(ns = networkstatus_parse_from_string(status))) {
+ log_err(LD_BUG,"Generated a networkstatus we couldn't parse.");
+ goto done;
+ }
+ networkstatus_free(ns);
+ }
+
{
cached_dir_t **ns_ptr = &the_v2_networkstatus;
if (*ns_ptr)
SMARTLIST_FOREACH(chunks, char *, cp, tor_free(cp));
smartlist_free(chunks);
+ {
+ networkstatus_vote_t *c;
+ if (!(c = networkstatus_parse_vote_from_string(result, 0))) {
+ log_err(LD_BUG,"Generated a networkstatus consensus we couldn't "
+ "parse.");
+ tor_free(result);
+ return NULL;
+ }
+ networkstatus_vote_free(c);
+ }
+
return result;
}