[tor-bugs] #5810 [Stem]: Implement verification of server descriptor

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Nov 11 18:14:29 UTC 2012


#5810: Implement verification of server descriptor
-------------------------+--------------------------------------------------
 Reporter:  reganeet     |          Owner:  reganeet
     Type:  enhancement  |         Status:  new     
 Priority:  normal       |      Milestone:          
Component:  Stem         |        Version:          
 Keywords:  descriptors  |         Parent:          
   Points:               |   Actualpoints:          
-------------------------+--------------------------------------------------

Comment(by atagar):

 Hi Eoin. As you mentioned this breaks the unit tests pretty badly. You're
 completely right that mocking.get_relay_server_descriptor() provides
 invalid data according to these integrity checks, but it does so somewhat
 on purpose. The get_relay_server_descriptor() function aims to...

 - provide a *minimal* server descriptor by default that only has mandatory
 arguments
 - allow the caller to get a custom descriptor by providing additional
 entries

 It would be a pita to then make sure that our content always matches our
 signature. Luckily it's also not necessary - we can mock is_valid() or
 other validation functions to always say "the descriptor is ok" in the
 unit tests.

 I'm not entirely clear what's happening in 0d433b5 but if this lets us
 check descriptor validity without the python-rsa module then that would be
 fantastic! Is the Crypto.Util module a builtin and available in python
 2.5? If so then do you think we can drop the python-rsa usage?

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5810#comment:15>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list