[tor-bugs] #9380 [BridgeDB]: BridgeDB should use Stem for parsing descriptors
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Feb 19 06:15:17 UTC 2015
#9380: BridgeDB should use Stem for parsing descriptors
-------------------------+-------------------------------------------------
Reporter: sysrqb | Owner: isis
Type: | Status: needs_review
enhancement | Milestone:
Priority: blocker | Version:
Component: | Keywords: stem, bridgedb-0.3.0, bridgedb-
BridgeDB | parsers, isis2014Q3Q4, isisExB
Resolution: | Parent ID:
Actual Points: |
Points: |
-------------------------+-------------------------------------------------
Comment (by isis):
FWIW, from #2895:
BridgeDB's verification chain for descriptors currently (as of #9380) goes
like this:
1.
[https://gitweb.torproject.org/user/isis/bridgedb.git/tree/lib/bridgedb/parse/descriptors.py?h=fix/9380-stem_r10#n70
Parse] the `@type bridge-networkstatus` documents in the `networkstatus-
bridges` file.
2. Create `Bridge`
[https://gitweb.torproject.org/user/isis/bridgedb.git/tree/lib/bridgedb/bridges.py?h=fix/9380-stem_r10#n735
class] instances for each this we parsed in step !#1. Call the
`Bridge.updateFromNetworkStatus()`
[https://gitweb.torproject.org/user/isis/bridgedb.git/tree/lib/bridgedb/bridges.py?h=fix/9380-stem_r10#n1338
method] with the corresponding networkstatus document for each Bridge.
This includes storing the
[https://gitweb.torproject.org/user/isis/bridgedb.git/tree/lib/bridgedb/bridges.py?h=fix/9380-stem_r10#n1348
descriptor digest] for each Bridge.
3.
[https://gitweb.torproject.org/user/isis/bridgedb.git/tree/lib/bridgedb/parse/descriptors.py?h=fix/9380-stem_r10#n123
Parse] the `@type bridge-server-descriptor`s found in the `bridge-
descriptors` file.
4.
[https://gitweb.torproject.org/user/isis/bridgedb.git/tree/lib/bridgedb/bridges.py?h=fix/9380-stem_r10#n1363
Update] each Bridge
[https://gitweb.torproject.org/user/isis/bridgedb.git/tree/lib/bridgedb/bridges.py?h=fix/9380-stem_r10#n881
only if the descriptor digest matches] the digested value of the `@type
bridge-server-descriptor` that was just parsed.
5.
[https://gitweb.torproject.org/user/isis/bridgedb.git/tree/lib/bridgedb/bridges.py?h=fix/9380-stem_r10#n1411
Store] the `extra-info-digest` from each `@type bridge-server-descriptor`.
6.
[https://gitweb.torproject.org/user/isis/bridgedb.git/tree/lib/bridgedb/parse/descriptors.py?h=fix/9380-stem_r10#n219
Parse] and
[https://gitweb.torproject.org/user/isis/bridgedb.git/tree/lib/bridgedb/parse/descriptors.py?h=fix/9380-stem_r10#n149
deduplicate] the `@type bridge-extrainfo` descriptors in `cached-
extrainfo` and `cached-extrainfo.new`.
7.
[https://gitweb.torproject.org/user/isis/bridgedb.git/tree/lib/bridgedb/bridges.py?h=fix/9380-stem_r10#n1413
Verify] the `router-signature` on the `@type bridge-extrainfo` descriptor
for each bridge, using the `signing-key` from the Bridge's `@type bridge-
server-descriptor`.
8.
[https://gitweb.torproject.org/user/isis/bridgedb.git/tree/lib/bridgedb/bridges.py?h=fix/9380-stem_r10#n1497
Update] the Bridge's
[https://gitweb.torproject.org/user/isis/bridgedb.git/tree/lib/bridgedb/bridges.py?h=fix/9380-stem_r10#n203
PluggableTransport class] instances.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9380#comment:39>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list