Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
to your account
Please answer these questions before submitting your issue. Thanks!
go version go1.9.1 windows/amd64
I am looking for tls server name indication routing and found.
There are different github repositories about that.
They all need to parse tls hello message to get the SNI.
I do think that using "crypto/tls" is the best.
Just to have a single reference on what is tls for golang.
In the end such projects need to implement their own code to decode hello message because most of "crypto/tls" constants and unmarshaling methods are not exported.
Basic constants exported for common tls.
Unmarshaling methods exported for tls "headers"
All these informations are not exported by "crypto/tls"
The text was updated successfully, but these errors were encountered:
Hello @cblomart, thank you for the experience report/bug!
Let me page some crypto folks @agl @FiloSottile @davecheney
Sorry, something went wrong.
Sorry, we don't want to export more stuff from the crypto/tls package. Any extra API is extra godoc and is extra user confusion when trying to read the docs.
If you just want to parse SNI using crypto/tls, see what I did at https://github.com/google/tcpproxy/blob/de1c7de/sni.go#L156
You could copy that, or move it to a common package on github somewhere.
Thx for the tip!
I little tricky nevertheless, but does the job without too much repetition.
No branches or pull requests