-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
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? Sign in to your account
crypto/tls: add fields to ClientHelloInfo #17430
Comments
It would be useful to have access to all of the information provided in the ClientHello to collect statistics on handshakes. |
@titanous Something we did again in the Cloudflare fork is expose the serialized CH in the ConnectionState, but I don't think anything that low-level fits in the standard library. Or did you have anything else in mind? |
It's not unprecedented. |
True, but then I would go for having a high-level CHI, and a RawClientHello, rather than polluting CHI with sort-of-raw fields. Opinions on whether it should go on CHI or on ConnState? We wanted it in ConnState so we could observe it from a http.Handler. Maybe ConnectionState should expose a CHI? Also, in 1.3 a CH might be a significant chunk of memory to keep around. |
Here is my patch on top of https://golang.org/cl/30790/, which I can't submit yet because the Go Gerrit does not seem to support CL with dependencies on CLs by other authors. SupportedVersions is terrible, but needed to be forward-compatible with the TLS 1.3 extension-based version negotiation. The SignatureSchemes term is stolen from 1.3 and is uint16 to be forward-compatible. /cc @agl EDIT: patch mailed |
@agl, decision? |
CL https://golang.org/cl/31391 mentions this issue. |
Fixes golang#17430 Change-Id: Ia1c25363d64e3091455ce00644438715aff30a0d Reviewed-on: https://go-review.googlesource.com/31391 Run-TryBot: Adam Langley <agl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Filippo Valsorda <hi@filippo.io>
Fixes golang#17430 Change-Id: Ia1c25363d64e3091455ce00644438715aff30a0d Reviewed-on: https://go-review.googlesource.com/31391 Run-TryBot: Adam Langley <agl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Filippo Valsorda <hi@filippo.io>
ClientHelloInfo is how callbacks make decisions on how to treat an incoming connection, which is becoming very powerful with https://golang.org/cl/30790/
As mentioned in #16066 (comment) it would be useful to have some more information in there.
The Cloudflare fork exposes Version, SignatureSchemes and LocalAddr. RemoteAddr seems fitting for completeness. ALPNProtocols as asked in #16066.
Looking at clientHelloMsg, only session resumption information, ocspStapling and scts are left, for which I can't think of a use case.
The text was updated successfully, but these errors were encountered: