GaloisInc / haskell-tor

A Haskell implementation of the Tor protocol.
BSD 3-Clause "New" or "Revised" License
272 stars 19 forks source link

Https support? #34

Open o1lo01ol1o opened 8 years ago

o1lo01ol1o commented 8 years ago

I wonder if there's an easier way to implement this than putting the full TLS spec in the connectToHost' function. Is that too optimistic? :)

acw commented 8 years ago

Oh, boy. There should be. And there will be, once Vincent pushes a new release of tls. :)

Basically, what you'd need to do is make Tor's TorSocket an instance of TLS's HasBackend and Backend. The latter should be easy (heh), but the former requires a patch to TLS. A patch that's been accepted and merged (see https://github.com/vincenthz/hs-tls/pull/149), but not revved publicly.