From 509ca9f74f8c98874588887a40ff192ea3447fe0 Mon Sep 17 00:00:00 2001 From: Jovis Date: Thu, 28 Nov 2024 19:28:47 +1100 Subject: [PATCH] test --- tlslistener/clienthelloconn.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tlslistener/clienthelloconn.go b/tlslistener/clienthelloconn.go index a367628e..7481f79a 100644 --- a/tlslistener/clienthelloconn.go +++ b/tlslistener/clienthelloconn.go @@ -191,7 +191,8 @@ func (rrc *clientHelloRecordingConn) processHello(info *tls.ClientHelloInfo) (*t helloMsg := utls.UnmarshalClientHello(hello) if helloMsg == nil { - return rrc.helloError("malformed ClientHello") + return nil, nil + //return rrc.helloError("malformed ClientHello") } sourceIP := rrc.RemoteAddr().(*net.TCPAddr).IP @@ -205,15 +206,18 @@ func (rrc *clientHelloRecordingConn) processHello(info *tls.ClientHelloInfo) (*t // pre-defined tickets. If it doesn't we should again return some sort of error or just // close the connection. if !helloMsg.TicketSupported { + //return nil, nil return rrc.helloError("ClientHello does not support session tickets") } if len(helloMsg.SessionTicket) == 0 { + //return nil, nil return rrc.helloError("ClientHello has no session ticket") } uss, err := rrc.utlsCfg.DecryptTicket(helloMsg.SessionTicket, utls.ConnectionState{}) if err != nil || uss == nil { + //return nil, nil return rrc.helloError("ClientHello has invalid session ticket") }