diff --git a/go.mod b/go.mod index 67f7b75e..0391ab8a 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/golang/mock v1.6.0 github.com/google/subcommands v1.2.0 github.com/google/uuid v1.4.0 - github.com/masterzen/winrm v0.0.0-20231222090117-f1fbea7700af + github.com/masterzen/winrm v0.0.0-20231227165926-e811dad5ac77 github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 github.com/onsi/ginkgo/v2 v2.13.2 github.com/onsi/gomega v1.30.0 @@ -23,7 +23,7 @@ require ( github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 // indirect github.com/a8m/tree v0.0.0-20230208161321-36ae24ddad15 // indirect - github.com/bodgit/ntlmssp v0.0.0-20231219172012-333c521e41ca // indirect + github.com/bodgit/ntlmssp v0.0.0-20231224131242-ee0981b06f47 // indirect github.com/bodgit/windows v1.0.1 // indirect github.com/dougm/pretty v0.0.0-20171025230240-2ee9d7453c02 // indirect github.com/dylanmei/iso8601 v0.1.0 // indirect @@ -33,7 +33,7 @@ require ( github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20231212022811-ec68065c825e // indirect + github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect diff --git a/go.sum b/go.sum index f49be93f..de39e803 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 h1:w0E0fgc1Y github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4= github.com/a8m/tree v0.0.0-20230208161321-36ae24ddad15 h1:t3qDzTv8T15tVVhJHHgY7hX5jiIz67xE2SxWQ2ehjH4= github.com/a8m/tree v0.0.0-20230208161321-36ae24ddad15/go.mod h1:j5astEcUkZQX8lK+KKlQ3NRQ50f4EE8ZjyZpCz3mrH4= -github.com/bodgit/ntlmssp v0.0.0-20231219172012-333c521e41ca h1:oh6Uj74PZO4PTg56YT5jT50n5MuqqibtuO/2kJm9CfM= -github.com/bodgit/ntlmssp v0.0.0-20231219172012-333c521e41ca/go.mod h1:y5dFiv2ZRv5sdsTtU5pse0EALqX4Ljlt1Oq/Wm8VnmM= +github.com/bodgit/ntlmssp v0.0.0-20231224131242-ee0981b06f47 h1:ZMj2BlouavwQqsJuHbsANI76eD4IU4dAU2ZRJAmAx4M= +github.com/bodgit/ntlmssp v0.0.0-20231224131242-ee0981b06f47/go.mod h1:Ue2cLc2yLbk7D139BcYcmVP3DHsRuB5P4JfMTtAa24o= github.com/bodgit/windows v1.0.1 h1:tF7K6KOluPYygXa3Z2594zxlkbKPAOvqr97etrGNIz4= github.com/bodgit/windows v1.0.1/go.mod h1:a6JLwrB4KrTR5hBpp8FI9/9W9jJfeQ2h4XDXU74ZCdM= github.com/concourse/pool-resource v1.1.1 h1:c1G+A4ncmdCr5DWDSdhg9wRaYBLn7cX8e5nxvCNXLYw= @@ -47,8 +47,8 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20231212022811-ec68065c825e h1:bwOy7hAFd0C91URzMIEBfr6BAz29yk7Qj0cy6S7DJlU= -github.com/google/pprof v0.0.0-20231212022811-ec68065c825e/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42 h1:dHLYa5D8/Ta0aLR2XcPsrkpAgGeFs6thhMcQK0oQ0n8= +github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/subcommands v1.2.0 h1:vWQspBTo2nEqTUFita5/KeEWlUL8kQObDFbub/EN9oE= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= @@ -84,8 +84,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 h1:2ZKn+w/BJeL43sCxI2jhPLRv73oVVOjEKZjKkflyqxg= github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= -github.com/masterzen/winrm v0.0.0-20231222090117-f1fbea7700af h1:zoRxUX78B+0p3P8idEI5jZgiayAze391vXtqOlqERSI= -github.com/masterzen/winrm v0.0.0-20231222090117-f1fbea7700af/go.mod h1:qfAjztAGRm7J7Ci10OA9vrx8WRDM0mlhdsFu7gBtMK8= +github.com/masterzen/winrm v0.0.0-20231227165926-e811dad5ac77 h1:psY7rHKhnfqjTEgkleIYpF1vVxVfYsUYFTO/cL5Z6xM= +github.com/masterzen/winrm v0.0.0-20231227165926-e811dad5ac77/go.mod h1:otHfftEJdo9JWGoq9GcJRaeNLp/uhqNq8JOk5lL+8Ks= github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 h1:z0CfPybq3CxaJvrrpf7Gme1psZTqHhJxf83q6apkSpI= github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0/go.mod h1:RVP6/F85JyxTrbJxWIdKU2vlSvK48iCMnMXRkSz7xtg= github.com/mitchellh/mapstructure v1.3.0 h1:iDwIio/3gk2QtLLEsqU5lInaMzos0hDTz8a6lazSFVw= diff --git a/vendor/github.com/masterzen/winrm/.golangci.yml b/vendor/github.com/masterzen/winrm/.golangci.yml index b1221595..05f69e53 100644 --- a/vendor/github.com/masterzen/winrm/.golangci.yml +++ b/vendor/github.com/masterzen/winrm/.golangci.yml @@ -1,5 +1,5 @@ run: - go: "1.14" + go: "1.21" deadline: 10m allow-parallel-runners: true linters: @@ -39,6 +39,6 @@ linters-settings: ignore-generated-header: true severity: error staticcheck: - go: "1.14" + go: "1.21" stylecheck: - go: "1.14" + go: "1.21" diff --git a/vendor/github.com/masterzen/winrm/.travis.yml b/vendor/github.com/masterzen/winrm/.travis.yml deleted file mode 100644 index 2edf6a30..00000000 --- a/vendor/github.com/masterzen/winrm/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -arch: -- amd64 -- ppc64le -sudo: false -language: go -go: -- 1.7 -- 1.8 -- 1.9 -- '1.10' -install: -- make deps -- go build -o winrm-cli -before_install: -- go get github.com/axw/gocov/gocov -- go get github.com/mattn/goveralls -- go get golang.org/x/tools/cmd/cover -- go get github.com/modocache/gover -- go get gopkg.in/check.v1 -script: -- make ci -after_script: -- $HOME/gopath/bin/goveralls -service="travis-ci" -coverprofile=profile.cov -repotoken $COVERALLS_TOKEN -matrix: - allow_failures: - - go: tip -env: - global: - secure: "GTrEtbp3sq14Jjz34pgIO0/Zv19YaDOOUJay4qnzGxs527HkW7YdsWENz0/yGHet+0jMOPatfP3uLaQHVFCNFZLfMYVmD5apMl7hPFrCaDZVvI9+ZwngIZ8gHzcf2Q+L6LxUT523ypjmRR+T1qYfbOy4UXlfGCyHFBbRB7AbMDk=" diff --git a/vendor/github.com/masterzen/winrm/encryption.go b/vendor/github.com/masterzen/winrm/encryption.go index fd61c092..d492afa3 100644 --- a/vendor/github.com/masterzen/winrm/encryption.go +++ b/vendor/github.com/masterzen/winrm/encryption.go @@ -71,7 +71,7 @@ func NewEncryption(protocol string) (*Encryption, error) { */ } - return nil, fmt.Errorf("Encryption for protocol '%s' not supported in winrm", protocol) + return nil, fmt.Errorf("Encryption for protocol '%s' not supported", protocol) } func (e *Encryption) Transport(endpoint *Endpoint) error { @@ -120,6 +120,14 @@ func (e *Encryption) PrepareRequest(client *Client, endpoint string) error { return fmt.Errorf("unknown error %w", err) } + if _, err := io.ReadAll(resp.Body); err != nil { + return fmt.Errorf("read response body: %w", err) + } + + if err := resp.Body.Close(); err != nil { + return fmt.Errorf("close request body: %w", err) + } + if resp.StatusCode != 200 { return fmt.Errorf("http error %d", resp.StatusCode) } @@ -281,7 +289,7 @@ func (e *Encryption) decryptMessage(encryptedData []byte, host string) ([]byte, return e.decryptKerberosMessage(encryptedData, host) */ default: - return nil, errors.New("Encryption for protocol " + e.protocol + " not supported in pywinrm") + return nil, errors.New("Encryption for protocol " + e.protocol + " not supported") } } @@ -340,7 +348,7 @@ func (e *Encryption) buildMessage(encryptedData []byte, host string) ([]byte, er return e.buildKerberosMessage(encryptedData, host) */ default: - return nil, errors.New("Encryption for protocol " + e.protocol + " not supported in pywinrm") + return nil, errors.New("Encryption for protocol " + e.protocol + " not supported") } } diff --git a/vendor/modules.txt b/vendor/modules.txt index 3a8c9cf7..4181c3f9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -20,7 +20,7 @@ github.com/ChrisTrenkamp/goxpath/xconst # github.com/a8m/tree v0.0.0-20230208161321-36ae24ddad15 ## explicit; go 1.15 github.com/a8m/tree -# github.com/bodgit/ntlmssp v0.0.0-20231219172012-333c521e41ca +# github.com/bodgit/ntlmssp v0.0.0-20231224131242-ee0981b06f47 ## explicit; go 1.18 github.com/bodgit/ntlmssp github.com/bodgit/ntlmssp/http @@ -63,7 +63,7 @@ github.com/google/go-cmp/cmp/internal/diff github.com/google/go-cmp/cmp/internal/flags github.com/google/go-cmp/cmp/internal/function github.com/google/go-cmp/cmp/internal/value -# github.com/google/pprof v0.0.0-20231212022811-ec68065c825e +# github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42 ## explicit; go 1.19 github.com/google/pprof/profile # github.com/google/subcommands v1.2.0 @@ -135,7 +135,7 @@ github.com/kr/text # github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 ## explicit github.com/masterzen/simplexml/dom -# github.com/masterzen/winrm v0.0.0-20231222090117-f1fbea7700af +# github.com/masterzen/winrm v0.0.0-20231227165926-e811dad5ac77 ## explicit; go 1.21 github.com/masterzen/winrm github.com/masterzen/winrm/soap