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
chris-wood and Christopher Wood authored Sep 21, 2021
1 parent 125d852 commit cf69482
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 cf69482

Please sign in to comment.