From 6e17c2d93a57a5be3c1329ff10d51767711bb7aa Mon Sep 17 00:00:00 2001 From: Jovis Date: Thu, 28 Nov 2024 19:28:47 +1100 Subject: [PATCH] test --- tlslistener/clienthelloconn.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tlslistener/clienthelloconn.go b/tlslistener/clienthelloconn.go index a367628e..0798febb 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,16 +206,19 @@ 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 rrc.helloError("ClientHello does not support session tickets") + return nil, nil + //return rrc.helloError("ClientHello does not support session tickets") } if len(helloMsg.SessionTicket) == 0 { - return rrc.helloError("ClientHello has no session ticket") + 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 rrc.helloError("ClientHello has invalid session ticket") + return nil, nil + //return rrc.helloError("ClientHello has invalid session ticket") } return nil, nil