[tor-bugs] #20918 [Core Tor/Tor]: Switch onion.c to use TRUNNEL_OPAQUE

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Jan 12 10:46:32 UTC 2017


#20918: Switch onion.c to use TRUNNEL_OPAQUE
--------------------------+------------------------------------
 Reporter:  nickm         |          Owner:  nickm
     Type:  defect        |         Status:  merge_ready
 Priority:  Medium        |      Milestone:  Tor: 0.3.0.x-final
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:  .2
Parent ID:  #15054        |         Points:  .1
 Reviewer:  dgoulet       |        Sponsor:
--------------------------+------------------------------------

Comment (by asn):

 Took a quick look here after Nick's request on IRC. I actually don't have
 a strong opinion and I'm fine both ways. I don't feel the change is that
 grave.

 ''Negatives:'' I do feel like the `ticket20918` code is more messy than
 before. That's mainly because some getters forced us to split code into
 multiple steps, and also some function names are lengthy so code had to
 wrap to fit into 80 columns. It's not terribly messy, but I imagine that
 it might be less readable to someone not familiar with trunnel. Also, if
 opaqueness is on by default, it makes it slightly harder to write trunnel
 code correctly. Also also, if this is a new coding pattern, do we need to
 change all the other places that use trunnel to actually solely use
 getters instead of direct struct access?

 ''Positives'': All in all, I guess making structs opaque is a positive
 step wrt encapsulation, information-hiding yada yada, so I can see why it
 would a good idea in principle to do this change.

 Personally, I'm OK with merging this patch. I'm also fine with postponing
 this patch until we have a more complete plan on how to properly do info-
 hiding over our whole codebase (and not just trunnel).

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


More information about the tor-bugs mailing list