mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-08-02 00:40:10 +00:00
RTG-2418 Update qtls
This commit is contained in:
27
vendor/github.com/marten-seemann/qtls-go1-19/conn.go
generated
vendored
27
vendor/github.com/marten-seemann/qtls-go1-19/conn.go
generated
vendored
@@ -125,6 +125,9 @@ type Conn struct {
|
||||
used0RTT bool
|
||||
|
||||
tmp [16]byte
|
||||
|
||||
connStateMutex sync.Mutex
|
||||
connState ConnectionStateWith0RTT
|
||||
}
|
||||
|
||||
// Access to net.Conn methods.
|
||||
@@ -1535,19 +1538,16 @@ func (c *Conn) handshakeContext(ctx context.Context) (ret error) {
|
||||
|
||||
// ConnectionState returns basic TLS details about the connection.
|
||||
func (c *Conn) ConnectionState() ConnectionState {
|
||||
c.handshakeMutex.Lock()
|
||||
defer c.handshakeMutex.Unlock()
|
||||
return c.connectionStateLocked()
|
||||
c.connStateMutex.Lock()
|
||||
defer c.connStateMutex.Unlock()
|
||||
return c.connState.ConnectionState
|
||||
}
|
||||
|
||||
// ConnectionStateWith0RTT returns basic TLS details (incl. 0-RTT status) about the connection.
|
||||
func (c *Conn) ConnectionStateWith0RTT() ConnectionStateWith0RTT {
|
||||
c.handshakeMutex.Lock()
|
||||
defer c.handshakeMutex.Unlock()
|
||||
return ConnectionStateWith0RTT{
|
||||
ConnectionState: c.connectionStateLocked(),
|
||||
Used0RTT: c.used0RTT,
|
||||
}
|
||||
c.connStateMutex.Lock()
|
||||
defer c.connStateMutex.Unlock()
|
||||
return c.connState
|
||||
}
|
||||
|
||||
func (c *Conn) connectionStateLocked() ConnectionState {
|
||||
@@ -1578,6 +1578,15 @@ func (c *Conn) connectionStateLocked() ConnectionState {
|
||||
return toConnectionState(state)
|
||||
}
|
||||
|
||||
func (c *Conn) updateConnectionState() {
|
||||
c.connStateMutex.Lock()
|
||||
defer c.connStateMutex.Unlock()
|
||||
c.connState = ConnectionStateWith0RTT{
|
||||
Used0RTT: c.used0RTT,
|
||||
ConnectionState: c.connectionStateLocked(),
|
||||
}
|
||||
}
|
||||
|
||||
// OCSPResponse returns the stapled OCSP response from the TLS server, if
|
||||
// any. (Only valid for client connections.)
|
||||
func (c *Conn) OCSPResponse() []byte {
|
||||
|
Reference in New Issue
Block a user