-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new_server_side_from_acceptor to allow init from a pre-existing A…
…cceptor (#33) In certain cases, a TLS server may need to pre-process the incoming bytes (eg: it may want to peek to see if this is raw HTTP, or HTTP over SSL) before deciding to hand it off to a TlsStream. Because TlsStream uses raw TcpSocket, there's no way to re-inject any sniffed bytes that were read() rather than peek()'d from the socket. This adds a new new_server_side_from_acceptor where an initial Acceptor can be passed in. It may contain either the full handshake or just a few prefix bytes that were sniffed from the socket earlier. We test this by creating a new TLS pair where the socket sniffs the first 8 bytes of the client handshake before firing up its TlsStream.
- Loading branch information
Showing
1 changed file
with
79 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters