Skip to content

Commit

Permalink
🐛 don't wait indefinitely when testing tls (#5145)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <[email protected]>
  • Loading branch information
imilchev authored Jan 31, 2025
1 parent dec5f92 commit 4306a37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions providers/network/resources/tlsshake/tlsshake.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ func (s *Tester) testTLS(proto string, target string, conf *ScanConfig) (int, er
if err != nil {
return 0, multierr.Wrap(err, "failed to connect to target")
}
if err := conn.SetReadDeadline(time.Now().Add(5 * time.Second)); err != nil {
return 0, err
}
defer conn.Close()

msg, cipherCount, err := s.helloTLSMsg(conf)
Expand Down

0 comments on commit 4306a37

Please sign in to comment.