[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



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

Comment(by atagar):

 > Sure. Do you want me to write the unit tests?

 Yup. Let me know if you want any help with it, ideally it'll be for the
 happy case and all of the edge cases you can think of (minimal descriptor
 content, malformed signature, etc). Really try to break your change via
 the tests, that's how we best get rigorous testing. :)

 > I've also renamed is_valid() to validate(), and instead of returning a
 boolean, it raises a ValueError if the validation fails, since we MUST
 perform this validation before accepting a descriptor. Do you think this
 makes sense?

 I don't think that's necessary, the constructor can simply do...

 {{{
 if validate and not self.is_valid():
   raise ValueError("yo, something bad is going on")
 }}}

 The constructor has a validate flag in case they want to accept malformed
 data so also calling this function 'validate' would be confusing. However,
 maybe we should come up with a more descriptive name than is_valid()?
 Would is_signature_valid() be better?

 > If anyone else would like to continue this work, I'm more than happy to
 share what I've got with him.

 Yup, please add all of the details you think would be helpful for future
 people trying to figure this out to this ticket. Also, lets add that task
 to the dev wiki...
 https://trac.torproject.org/projects/tor/wiki/doc/stem

 Thanks! -Damian

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5810#comment:6>
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