forked from quic-go/quic-go
fill out the http.Response.TLS field
This commit is contained in:
@@ -143,6 +143,25 @@ func GetConnectionState(conn *Conn) ConnectionState {
|
||||
return conn.ConnectionState()
|
||||
}
|
||||
|
||||
// ToTLSConnectionState extracts the tls.ConnectionState
|
||||
// Warning: Calling ExportKeyingMaterial won't work.
|
||||
func ToTLSConnectionState(cs ConnectionState) tls.ConnectionState {
|
||||
return tls.ConnectionState{
|
||||
Version: cs.Version,
|
||||
HandshakeComplete: cs.HandshakeComplete,
|
||||
DidResume: cs.DidResume,
|
||||
CipherSuite: cs.CipherSuite,
|
||||
NegotiatedProtocol: cs.NegotiatedProtocol,
|
||||
NegotiatedProtocolIsMutual: cs.NegotiatedProtocolIsMutual,
|
||||
ServerName: cs.ServerName,
|
||||
PeerCertificates: cs.PeerCertificates,
|
||||
VerifiedChains: cs.VerifiedChains,
|
||||
SignedCertificateTimestamps: cs.SignedCertificateTimestamps,
|
||||
OCSPResponse: cs.OCSPResponse,
|
||||
TLSUnique: cs.TLSUnique,
|
||||
}
|
||||
}
|
||||
|
||||
type cipherSuiteTLS13 struct {
|
||||
ID uint16
|
||||
KeyLen int
|
||||
|
||||
Reference in New Issue
Block a user