[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #10395 [Tor]: Tor's consensus lists Torbrowser updates
#10395: Tor's consensus lists Torbrowser updates
-------------------------+-------------------------------------------------
Reporter: | Owner: mikeperry
StrangeCharm | Status: needs_review
Type: | Milestone: Tor: 0.2.6.x-final
enhancement | Version:
Priority: major | Keywords: pantheon chronos prop227 nickm-
Component: Tor | patch
Resolution: | Parent ID: #10393
Actual Points: |
Points: |
-------------------------+-------------------------------------------------
Comment (by mcs):
Replying to [comment:18 nickm]:
> I've added another commit to implement the GETINFO command, I hope.
A few comments:
- There is a small typo in src/or/control.c (replace "abour" with
"about").
- I think the strcmpstart() call that you added in the following code
should just be strcmp():
{{{
} else if (!strcmpstart(question, "ns/purpose/")) {
*answer = networkstatus_getinfo_by_purpose(question+11, time(NULL));
return *answer ? 0 : -1;
+ } else if (!strcmpstart(question, "consensus/packages")) {
+ const networkstatus_t *ns = networkstatus_get_latest_consensus();
+ if (ns->package_lines)
+ *answer = smartlist_join_strings(ns->package_lines, "\n", 1, NULL);
+ return *answer ? 0 : -1;
} else {
return 0;
}
}}}
I am not sure how to test this myself to see that things look from the
client side of the control port, but I trust you that it is correct.
One more thing we made need though: a way to retrieve the "valid-after"
date of the consensus. I think we need this to implement this portion of
prop 227:
{{{
If the current consensus timestamp is not yet more recent than
the proposed update timestamp, the updater will delay installing
the package until a consensus timestamp that is more recent than
the update timestamp has been obtained by the Tor client.
}}}
At least I think "current consensus timestamp" probably refers to the
"valid-after" timestamp.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/10395#comment:21>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs