mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
set a net.Conn for tls.ClientHelloInfo.Conn used by GetCertificate (#4014)
This commit is contained in:
parent
f7b03bf6b3
commit
18e4a9f516
2 changed files with 32 additions and 1 deletions
|
@ -135,6 +135,13 @@ func NewCryptoSetupServer(
|
|||
return gcfc(info)
|
||||
}
|
||||
}
|
||||
if quicConf.TLSConfig.GetCertificate != nil {
|
||||
gc := quicConf.TLSConfig.GetCertificate
|
||||
quicConf.TLSConfig.GetCertificate = func(info *tls.ClientHelloInfo) (*tls.Certificate, error) {
|
||||
info.Conn = &conn{localAddr: localAddr, remoteAddr: remoteAddr}
|
||||
return gc(info)
|
||||
}
|
||||
}
|
||||
|
||||
cs.tlsConf = quicConf.TLSConfig
|
||||
cs.conn = qtls.QUICServer(quicConf)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue