Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jovis7 committed Nov 28, 2024
1 parent 5e9b06c commit 98a9f72
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tlslistener/clienthelloconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ func (rrc *clientHelloRecordingConn) processHello(info *tls.ClientHelloInfo) (*t
helloMsg := utls.UnmarshalClientHello(hello)

if helloMsg == nil {
//return nil, nil
return rrc.helloError("malformed ClientHello")
}

Expand All @@ -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 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 rrc.helloError("ClientHello has invalid session ticket")
return nil, nil
//return rrc.helloError("ClientHello has invalid session ticket")
}

return nil, nil
Expand Down

0 comments on commit 98a9f72

Please sign in to comment.