Description

This PR fixes the indefinite hang reported in #819.

The tlsHandshakeWithTimeout function in pkg/tlsx/ztls/ztls.go was previously blocking. I have refactored it to run in a separate goroutine with a buffered channel, ensuring the context timeout is strictly respected.

Proof

Verified with a new test case TestTLSHandshakeHang that simulates a hanging connection. proof41

Fixes #819 /claim #819

Summary by CodeRabbit

  • Bug Fixes

    • Improved TLS handshake timeout handling and error normalization so certificate-only responses are treated as successful and timeouts are reliably reported.
  • Tests

    • Added test coverage validating TLS client handshake timeout behavior to ensure timely timeout detection.

Claim

Total prize pool $1,324
Total paid $0
Status Pending
Submitted February 09, 2026
Last updated February 09, 2026

Contributors

SC

Scatheus

@Scatheus

100%

Sponsors

YO

youssefosama3820009-commits

@youssefosama3820009-commits

$1,224
PR

ProjectDiscovery

@projectdiscovery

$100