This PR tightens timeout enforcement during cipher enumeration to prevent indefinite hangs in both ctls and ztls paths.
pkg/tlsx/tls/tls.go
context.WithTimeout) when options.Timeout is set.HandshakeContext so timeout is honored during TLS handshake.CipherSuites.pkg/tlsx/ztls/ztls.go
tlsHandshakeWithTimeout now runs handshake in goroutine and exits on context cancellation.pkg/tlsx/ztls/timeout_test.go
TestTLSHandshakeWithTimeout_ContextDeadline).Focused local verification:
go test ./pkg/tlsx/ztls -run TestTLSHandshakeWithTimeout_ContextDeadline -count=1
# ok
go test ./pkg/tlsx/tls -run TestNonExistent -count=1
# ok (compile check for changed ctls path)
/claim #819
Bug Fixes
Tests
dahu8194-gmail-com
@dahu8194-gmail-com
youssefosama3820009-commits
@youssefosama3820009-commits
ProjectDiscovery
@projectdiscovery