Skip to content

Commit

Permalink
crypto/tls: Add ECHOffered bool to ConnectionState (#105)
Browse files Browse the repository at this point in the history
Co-authored-by: Christopher Wood <[email protected]>
  • Loading branch information
2 people authored and Lekensteyn committed Sep 24, 2021
1 parent c434774 commit 7d4ce7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/crypto/tls/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@ type ConnectionState struct {
// accepted by the server.
ECHAccepted bool

// ECHOffered is set if the ECH extension is present in the ClientHello.
// This means the client has offered ECH or sent GREASE ECH.
ECHOffered bool

// CFControl is used to pass additional TLS configuration information to
// HTTP requests.
//
Expand Down
1 change: 1 addition & 0 deletions src/crypto/tls/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,7 @@ func (c *Conn) connectionStateLocked() ConnectionState {
state.SignedCertificateTimestamps = c.scts
state.OCSPResponse = c.ocspResponse
state.ECHAccepted = c.ech.accepted
state.ECHOffered = c.ech.offered || c.ech.greased
state.CFControl = c.config.CFControl
if !c.didResume && c.vers != VersionTLS13 {
if c.clientFinishedIsFirst {
Expand Down

0 comments on commit 7d4ce7c

Please sign in to comment.