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