cleaner initialization of winrmcp
This commit is contained in:
parent
852a74c49d
commit
d7cb9baa43
|
@ -214,11 +214,14 @@ func (c *Communicator) newCopyClient() (*winrmcp.Winrmcp, error) {
|
|||
},
|
||||
Https: c.connInfo.HTTPS,
|
||||
Insecure: c.connInfo.Insecure,
|
||||
TransportDecorator: c.client.TransportDecorator,
|
||||
OperationTimeout: c.Timeout(),
|
||||
MaxOperationsPerShell: 15, // lowest common denominator
|
||||
}
|
||||
|
||||
if c.connInfo.NTLM == true {
|
||||
config.TransportDecorator = func() winrm.Transporter { return &winrm.ClientNTLM{} }
|
||||
}
|
||||
|
||||
if c.connInfo.CACert != "" {
|
||||
config.CACertBytes = []byte(c.connInfo.CACert)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue