Skip to content

Commit 6e61f4b

Browse files
debug force_ssl (#30)
the previous force_ssl mechanism didn't work. This one does. Signed-off-by: Michée Lengronne <[email protected]>
1 parent a233b4f commit 6e61f4b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

controls/ssl_test.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@
6262

6363
# Filter out ports that don't respond to any version of SSL
6464
sslports = tcpports.find_all do |tcpport|
65-
!exclude_ports.include?(tcpport[:port]) && (ssl(tcpport).enabled? unless force_ssl)
65+
if force_ssl
66+
!exclude_ports.include?(tcpport[:port])
67+
else
68+
!exclude_ports.include?(tcpport[:port]) && ssl(tcpport).enabled?
69+
end
6670
end
6771

6872
# Troubleshooting control to show InSpec version and list

0 commit comments

Comments
 (0)