diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index e11c717..0000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @mpenick @dougwettlaufer diff --git a/astra/bundle.go b/astra/bundle.go index ff04565..2d6f59a 100644 --- a/astra/bundle.go +++ b/astra/bundle.go @@ -26,7 +26,6 @@ import ( "io" "io/ioutil" "net/http" - "runtime" "time" "github.com/datastax/astra-client-go/v2/astra" @@ -53,10 +52,7 @@ func LoadBundleZip(reader *zip.Reader) (*Bundle, error) { return nil, err } - rootCAs, err := createCertPool() - if err != nil { - return nil, err - } + rootCAs := createCertPool() ok := rootCAs.AppendCertsFromPEM(contents["ca.crt"]) if !ok { @@ -200,10 +196,7 @@ func loadBytes(file *zip.File) ([]byte, error) { return ioutil.ReadAll(r) } -func createCertPool() (*x509.CertPool, error) { - ca, err := x509.SystemCertPool() - if err != nil && runtime.GOOS == "windows" { - return x509.NewCertPool(), nil - } - return ca, err + +func createCertPool() *x509.CertPool { + return x509.NewCertPool() } diff --git a/astra/endpoint_test.go b/astra/endpoint_test.go index 649c783..e73cf64 100644 --- a/astra/endpoint_test.go +++ b/astra/endpoint_test.go @@ -233,10 +233,7 @@ func runTestMetaSvcAsync(sniProxyAddr string, contactPoints []string) (*http.Ser } func createServerTLSConfig(dnsName string) (*tls.Config, error) { - rootCAs, err := createCertPool() - if err != nil { - return nil, err - } + rootCAs := createCertPool() if !rootCAs.AppendCertsFromPEM(testCAPEM) { return nil, errors.New("unable to add cert to CA pool") diff --git a/go.mod b/go.mod index 4d4784c..e499b1c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/datastax/cql-proxy -go 1.24.2 +go 1.19 require ( github.com/alecthomas/kong v0.2.17 diff --git a/proxy/run_test.go b/proxy/run_test.go index 2e4f698..51cd34f 100644 --- a/proxy/run_test.go +++ b/proxy/run_test.go @@ -461,7 +461,7 @@ func TestRun_ProxyTLS(t *testing.T) { return checkLiveness(httpBindAddr) })) - rootCAs, err := createCertPool() + rootCAs, err := createSystemCertPool() require.NoError(t, err) ok := rootCAs.AppendCertsFromPEM(testCAPEM) @@ -720,7 +720,7 @@ func checkReadiness(t *testing.T, host string) (outage time.Duration, status int return outage, res.StatusCode } -func createCertPool() (*x509.CertPool, error) { +func createSystemCertPool() (*x509.CertPool, error) { ca, err := x509.SystemCertPool() if err != nil && runtime.GOOS == "windows" { return x509.NewCertPool(), nil