forked from quic-go/quic-go
fix conversion of qtls.ClientHelloInfo in GetConfigForClient
This commit is contained in:
@@ -82,6 +82,10 @@ type qtlsClientHelloInfo struct {
|
||||
|
||||
func toTLSClientHelloInfo(chi *qtls.ClientHelloInfo) *tls.ClientHelloInfo {
|
||||
qtlsCHI := (*qtlsClientHelloInfo)(unsafe.Pointer(chi))
|
||||
var config *tls.Config
|
||||
if qtlsCHI.config != nil {
|
||||
config = qtlsConfigToTLSConfig((*qtls.Config)(unsafe.Pointer(qtlsCHI.config)))
|
||||
}
|
||||
return (*tls.ClientHelloInfo)(unsafe.Pointer(&clientHelloInfo{
|
||||
CipherSuites: chi.CipherSuites,
|
||||
ServerName: chi.ServerName,
|
||||
@@ -91,6 +95,6 @@ func toTLSClientHelloInfo(chi *qtls.ClientHelloInfo) *tls.ClientHelloInfo {
|
||||
SupportedProtos: chi.SupportedProtos,
|
||||
SupportedVersions: chi.SupportedVersions,
|
||||
Conn: chi.Conn,
|
||||
config: qtlsConfigToTLSConfig((*qtls.Config)(unsafe.Pointer(qtlsCHI.config))),
|
||||
config: config,
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user