Test that our test suite's list of Tor authorities is the same as the hardcoded ones in the Tor binary
Originally created by @anonym on #8960 (Redmine)
Per #8959 (closed), we need to ensure that our list of hardcoded Tor authorities is the same as what’s hardcoded in the shipped Tor binary.
An example of how the string looks in the Tor binary:
Faravahar orport=443 v3ident=EFCBE720AB3A82B99F9E953CD5BF50F7EEFC7B97 154.35.175.225:80 CF6D 0AAF B385 BE71 B8E1 11FC 5CFF 4B47 9237 33BC
but there can also be at least the no-v2
and bridge
flags (between
orport
and v3ident
). Example
regex:
^\S+ orport=\d+ ( bridge)?( no-v2)?v3ident=[A-Z0-9]{40} ${IP_ADDRESS}:\d+( [A-Z0-9]{4}){10}$
So for each ${IP_ADDRESS}
in our TOR_AUTHORITIES
list, we’d grep for
that regex on strings /usr/bin/tor
or something. Beautiful!
Feature Branch: test/8960-verify-tor-authorities
Related issues
- Related to #8959 (closed)