From bb597f2e95843eae0ea6bba1a1fdd9e0020a0add Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Wed, 11 Jul 2018 13:02:54 +0100 Subject: Kill fallback SSL certificate check after 10 seconds --- lib/custodian/protocoltest/ssl.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/custodian/protocoltest/ssl.rb b/lib/custodian/protocoltest/ssl.rb index 82754c6..0d52fcc 100644 --- a/lib/custodian/protocoltest/ssl.rb +++ b/lib/custodian/protocoltest/ssl.rb @@ -166,7 +166,7 @@ class SSLCheck in_cert = false # Run the command. - out = `echo "" | openssl s_client -servername #{uri.host} -connect #{uri.host}:#{uri.port} 2>/dev/null` + out = `echo "" | timeout --kill-after=10s 10s openssl s_client -servername #{uri.host} -connect #{uri.host}:#{uri.port} 2>/dev/null` # For each line of the output out.split( /[\r\n]/ ).each do |line| -- cgit v1.2.1 From cbe814134b871dd2df13e7f5b60ff931694a1273 Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Wed, 11 Jul 2018 13:11:52 +0100 Subject: SIGKILL slightly after SIGTERM --- lib/custodian/protocoltest/ssl.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/custodian/protocoltest/ssl.rb b/lib/custodian/protocoltest/ssl.rb index 0d52fcc..209fff0 100644 --- a/lib/custodian/protocoltest/ssl.rb +++ b/lib/custodian/protocoltest/ssl.rb @@ -166,7 +166,7 @@ class SSLCheck in_cert = false # Run the command. - out = `echo "" | timeout --kill-after=10s 10s openssl s_client -servername #{uri.host} -connect #{uri.host}:#{uri.port} 2>/dev/null` + out = `echo "" | timeout --kill-after=12s 10s openssl s_client -servername #{uri.host} -connect #{uri.host}:#{uri.port} 2>/dev/null` # For each line of the output out.split( /[\r\n]/ ).each do |line| -- cgit v1.2.1