Skip to content

Commit b42beea

Browse files
committed
maintain compatibility for non-validated connect
1 parent cbfe18e commit b42beea

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

plugins/nexpose.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ def cmd_nexpose_connect(*args)
127127
@trust_cert_file = args[1]
128128
if File.exists? @trust_cert_file
129129
@trust_cert = File.read(@trust_cert_file)
130+
else
131+
@sslv = @trust_cert_file
130132
end
131133
end
132134
when 4,5
@@ -135,6 +137,8 @@ def cmd_nexpose_connect(*args)
135137
@trust_cert_file = @trust_cert
136138
if File.exists? @trust_cert_file
137139
@trust_cert = File.read(@trust_cert_file)
140+
else
141+
@sslv = @trust_cert_file
138142
end
139143
end
140144
else
@@ -146,9 +150,9 @@ def cmd_nexpose_connect(*args)
146150

147151
def nexpose_usage
148152
print_status("Usage: ")
149-
print_status(" nexpose_connect username:password@host[:port] <ssl-confirm>")
153+
print_status(" nexpose_connect username:password@host[:port] <ssl-confirm || trusted_cert_file>")
150154
print_status(" -OR- ")
151-
print_status(" nexpose_connect username password host port <ssl-confirm>")
155+
print_status(" nexpose_connect username password host port <ssl-confirm || trusted_cert_file>")
152156
end
153157

154158
def nexpose_login
@@ -693,4 +697,4 @@ def to_json
693697
end
694698
end
695699
end
696-
end
700+
end

0 commit comments

Comments
 (0)