mirror of
https://github.com/inspec/inspec
synced 2024-11-26 22:50:36 +00:00
feature: switch winrm port based on protocol
This commit is contained in:
parent
5714395232
commit
1e80a197c4
1 changed files with 3 additions and 1 deletions
|
@ -62,14 +62,16 @@ elsif ENV['WINRM_SPEC']
|
|||
user = ENV['LOGIN_USERNAME']
|
||||
pass = ENV['LOGIN_PASSWORD']
|
||||
host = ENV['TARGET_HOST']
|
||||
port = ENV['LOGIN_PORT'] || '5985'
|
||||
port = ENV['LOGIN_PORT']
|
||||
|
||||
# check if we should use ssl
|
||||
ssl = ENV['WINRM_SSL']
|
||||
if (ssl)
|
||||
scheme = "https"
|
||||
port = port || '5986'
|
||||
else
|
||||
scheme = "http"
|
||||
port = port || '5985'
|
||||
end
|
||||
|
||||
# deactivate certificate check if requested, default is on
|
||||
|
|
Loading…
Reference in a new issue