lib/chef/knife/winrm_session.rb in knife-windows-1.4.0 vs lib/chef/knife/winrm_session.rb in knife-windows-1.4.1

- old
+ new

@@ -40,9 +40,12 @@ Chef::Log.debug("WinRM::WinRMWebService options: #{opts}") Chef::Log.debug("Endpoint: #{endpoint}") Chef::Log.debug("Transport: #{options[:transport]}") @winrm_session = WinRM::WinRMWebService.new(@endpoint, options[:transport], opts) + transport = @winrm_session.instance_variable_get(:@xfer) + http_client = transport.instance_variable_get(:@httpcli) + Chef::HTTP::DefaultSSLPolicy.new(http_client.ssl_config).set_custom_certs @winrm_session.set_timeout(options[:operation_timeout]) if options[:operation_timeout] end def relay_command(command) remote_id = @winrm_session.open_shell