diff --git a/vendor/github.com/masterzen/winrm/auth.go b/vendor/github.com/masterzen/winrm/auth.go index 93f607631..2e7c3757f 100644 --- a/vendor/github.com/masterzen/winrm/auth.go +++ b/vendor/github.com/masterzen/winrm/auth.go @@ -3,7 +3,9 @@ package winrm import ( "fmt" "io/ioutil" + "net" "strings" + "time" "github.com/masterzen/azure-sdk-for-go/core/http" "github.com/masterzen/azure-sdk-for-go/core/tls" @@ -22,10 +24,15 @@ func (c *ClientAuthRequest) Transport(endpoint *Endpoint) error { } transport := &http.Transport{ + Proxy: http.ProxyFromEnvironment, TLSClientConfig: &tls.Config{ InsecureSkipVerify: endpoint.Insecure, Certificates: []tls.Certificate{cert}, }, + Dial: (&net.Dialer{ + Timeout: 30 * time.Second, + KeepAlive: 30 * time.Second, + }).Dial, ResponseHeaderTimeout: endpoint.Timeout, } diff --git a/vendor/github.com/masterzen/winrm/endpoint.go b/vendor/github.com/masterzen/winrm/endpoint.go index c81df4989..13e2ddae2 100644 --- a/vendor/github.com/masterzen/winrm/endpoint.go +++ b/vendor/github.com/masterzen/winrm/endpoint.go @@ -18,6 +18,8 @@ type Endpoint struct { HTTPS bool // set the flag true for skipping ssl verifications Insecure bool + // if set, used to verify the hostname on the returned certificate + TLSServerName string // pointer pem certs, and key CACert []byte // cert auth to intdetify the server cert Key []byte // public key for client auth connections diff --git a/vendor/github.com/masterzen/winrm/http.go b/vendor/github.com/masterzen/winrm/http.go index 2d9310dca..929ea82c8 100644 --- a/vendor/github.com/masterzen/winrm/http.go +++ b/vendor/github.com/masterzen/winrm/http.go @@ -4,8 +4,10 @@ import ( "crypto/tls" "fmt" "io/ioutil" + "net" "net/http" "strings" + "time" "github.com/masterzen/winrm/soap" ) @@ -44,7 +46,12 @@ func (c *clientRequest) Transport(endpoint *Endpoint) error { Proxy: http.ProxyFromEnvironment, TLSClientConfig: &tls.Config{ InsecureSkipVerify: endpoint.Insecure, + ServerName: endpoint.TLSServerName, }, + Dial: (&net.Dialer{ + Timeout: 30 * time.Second, + KeepAlive: 30 * time.Second, + }).Dial, ResponseHeaderTimeout: endpoint.Timeout, } diff --git a/vendor/vendor.json b/vendor/vendor.json index d4b22dac6..6d9659245 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -579,15 +579,16 @@ "revision": "95ba30457eb1121fa27753627c774c7cd4e90083" }, { - "checksumSHA1": "kWWDtHJJp7Hiq0zj0xecRGqMoeU=", + "checksumSHA1": "LY1os7cX/gWXWTWYCHCtEaf5jSw=", "path": "github.com/masterzen/winrm", - "revision": "acf371f6aff113fc0104a61cd72db45a7c27d310", - "revisionTime": "2017-03-29T23:04:57Z" + "revision": "1ca0ba637a877ee12b69abc73c6161fccb77b70a", + "revisionTime": "2017-06-01T21:16:37Z" }, { "checksumSHA1": "KTsgWipT3ennAAtaKxEZairxero=", "path": "github.com/masterzen/winrm/soap", - "revision": "ef3efbb97f99fc204bd9c7edf778a0dbd9781baf" + "revision": "1ca0ba637a877ee12b69abc73c6161fccb77b70a", + "revisionTime": "2017-06-01T21:16:37Z" }, { "checksumSHA1": "bx+egnFe0OB0BZBcgZcaqsvcmS4=",