diff --git a/cmd/http-check/main.go b/cmd/http-check/main.go index bfbdd25..345c422 100644 --- a/cmd/http-check/main.go +++ b/cmd/http-check/main.go @@ -13,9 +13,9 @@ import ( "strings" "time" - "github.com/sensu/sensu-plugin-sdk/sensu" corev2 "github.com/sensu/sensu-go/api/core/v2" "github.com/sensu/sensu-go/types" + "github.com/sensu/sensu-plugin-sdk/sensu" ) // Config represents the check plugin config. @@ -154,8 +154,6 @@ func checkArgs(event *types.Event) (int, error) { } tlsConfig.InsecureSkipVerify = plugin.InsecureSkipVerify - tlsConfig.CipherSuites = corev2.DefaultCipherSuites - if (len(plugin.MTLSKeyFile) > 0 && len(plugin.MTLSCertFile) == 0) || (len(plugin.MTLSCertFile) > 0 && len(plugin.MTLSKeyFile) == 0) { return sensu.CheckStateWarning, fmt.Errorf("mTLS auth requires both --mtls-key-file and --mtls-cert-file") } diff --git a/cmd/http-get/main.go b/cmd/http-get/main.go index f0acd6d..9344a08 100644 --- a/cmd/http-get/main.go +++ b/cmd/http-get/main.go @@ -13,8 +13,8 @@ import ( "strings" "time" - "github.com/sensu/sensu-plugin-sdk/sensu" corev2 "github.com/sensu/sensu-go/api/core/v2" + "github.com/sensu/sensu-plugin-sdk/sensu" ) // Config represents the check plugin config. @@ -133,8 +133,6 @@ func checkArgs(event *corev2.Event) (int, error) { } tlsConfig.InsecureSkipVerify = plugin.InsecureSkipVerify - tlsConfig.CipherSuites = corev2.DefaultCipherSuites - if (len(plugin.MTLSKeyFile) > 0 && len(plugin.MTLSCertFile) == 0) || (len(plugin.MTLSCertFile) > 0 && len(plugin.MTLSKeyFile) == 0) { return sensu.CheckStateWarning, fmt.Errorf("mTLS auth requires both --mtls-key-file and --mtls-cert-file") } @@ -197,7 +195,7 @@ func executeCheck(event *corev2.Event) (int, error) { return sensu.CheckStateCritical, nil } - fmt.Printf("%s",string(body)) + fmt.Printf("%s", string(body)) return sensu.CheckStateOK, nil } diff --git a/cmd/http-json/main.go b/cmd/http-json/main.go index 599605b..7d1b9a5 100644 --- a/cmd/http-json/main.go +++ b/cmd/http-json/main.go @@ -16,8 +16,8 @@ import ( "github.com/PaesslerAG/gval" "github.com/itchyny/gojq" - "github.com/sensu/sensu-plugin-sdk/sensu" corev2 "github.com/sensu/sensu-go/api/core/v2" + "github.com/sensu/sensu-plugin-sdk/sensu" ) // Config represents the check plugin config. @@ -156,8 +156,6 @@ func checkArgs(event *corev2.Event) (int, error) { } tlsConfig.InsecureSkipVerify = plugin.InsecureSkipVerify - tlsConfig.CipherSuites = corev2.DefaultCipherSuites - if (len(plugin.MTLSKeyFile) > 0 && len(plugin.MTLSCertFile) == 0) || (len(plugin.MTLSCertFile) > 0 && len(plugin.MTLSKeyFile) == 0) { return sensu.CheckStateWarning, fmt.Errorf("mTLS auth requires both --mtls-key-file and --mtls-cert-file") } diff --git a/cmd/http-perf/main.go b/cmd/http-perf/main.go index 1e4788a..761d9f1 100644 --- a/cmd/http-perf/main.go +++ b/cmd/http-perf/main.go @@ -9,9 +9,9 @@ import ( "strings" "time" - "github.com/sensu/sensu-plugin-sdk/sensu" corev2 "github.com/sensu/sensu-go/api/core/v2" "github.com/sensu/sensu-go/types" + "github.com/sensu/sensu-plugin-sdk/sensu" ) // Config represents the check plugin config. @@ -171,8 +171,6 @@ func checkArgs(event *types.Event) (int, error) { } tlsConfig.InsecureSkipVerify = plugin.InsecureSkipVerify - tlsConfig.CipherSuites = corev2.DefaultCipherSuites - if (len(plugin.MTLSKeyFile) > 0 && len(plugin.MTLSCertFile) == 0) || (len(plugin.MTLSCertFile) > 0 && len(plugin.MTLSKeyFile) == 0) { return sensu.CheckStateWarning, fmt.Errorf("mTLS auth requires both --mtls-key-file and --mtls-cert-file") }