Skip to content

Commit

Permalink
Merge pull request #4548 from snyk/fix/HEAD-263_custom_certificates
Browse files Browse the repository at this point in the history
fix: always read additional CA certs
  • Loading branch information
PeterSchafer committed Apr 11, 2023
2 parents d8ae594 + ce5a877 commit 6d434de
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
10 changes: 0 additions & 10 deletions cliv2/cmd/cliv2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,16 +391,6 @@ func MainWithErrorCode() int {
writeLogHeader(config, networkAccess)
}

extraCaCertFile := config.GetString(constants.SNYK_CA_CERTIFICATE_LOCATION_ENV)
if len(extraCaCertFile) > 0 {
err = networkAccess.AddRootCAs(extraCaCertFile)
if err != nil {
debugLogger.Printf("Failed to AddRootCAs from '%s' (%v)\n", extraCaCertFile, err)
} else {
debugLogger.Println("Using additional CAs from file:", extraCaCertFile)
}
}

// init Analytics
cliAnalytics := engine.GetAnalytics()
cliAnalytics.SetVersion(cliv2.GetFullVersion())
Expand Down
2 changes: 1 addition & 1 deletion cliv2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/google/uuid v1.3.0
github.com/pkg/errors v0.9.1
github.com/snyk/cli-extension-sbom v0.0.0-20230331093938-3d6a5dfdae22
github.com/snyk/go-application-framework v0.0.0-20230404140303-619207af7ffe
github.com/snyk/go-application-framework v0.0.0-20230411133750-4e6236fd6efb
github.com/snyk/go-httpauth v0.0.0-20230328170530-1af63c87b650
github.com/snyk/snyk-iac-capture v0.6.0
github.com/spf13/cobra v1.6.0
Expand Down
4 changes: 2 additions & 2 deletions cliv2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZV
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/snyk/cli-extension-sbom v0.0.0-20230331093938-3d6a5dfdae22 h1:ucnmZwoo1gGU+YjmbYZAix5HKIZ1FYBNDau5RPwCSS8=
github.com/snyk/cli-extension-sbom v0.0.0-20230331093938-3d6a5dfdae22/go.mod h1:83CWQ4Oy3mL8cVkj/etP+bh7I8I1xb+n2bpsE6URuPs=
github.com/snyk/go-application-framework v0.0.0-20230404140303-619207af7ffe h1:PgV9ubvpZIIQ17GlRlCumvq61sCtEymBgeFI+BdsVX0=
github.com/snyk/go-application-framework v0.0.0-20230404140303-619207af7ffe/go.mod h1:vh4egVjz3y+keFRGr0+uaifHNHmcXjDXk/8U7UwHg9E=
github.com/snyk/go-application-framework v0.0.0-20230411133750-4e6236fd6efb h1:SYqFQi33IHwNmytu5vBqvsePfyud5feTZVkZHBVVJrQ=
github.com/snyk/go-application-framework v0.0.0-20230411133750-4e6236fd6efb/go.mod h1:vh4egVjz3y+keFRGr0+uaifHNHmcXjDXk/8U7UwHg9E=
github.com/snyk/go-httpauth v0.0.0-20230328170530-1af63c87b650 h1:CsLoEIHxq4i3d9di8RoN3J3D1/oK20oroEZUGShor0o=
github.com/snyk/go-httpauth v0.0.0-20230328170530-1af63c87b650/go.mod h1:88KbbvGYlmLgee4OcQ19yr0bNpXpOr2kciOthaSzCAg=
github.com/snyk/snyk-iac-capture v0.6.0 h1:P9GWIyvl+F23XZOCuJvzGV6tME/vxbKpZM7/9dw48as=
Expand Down

0 comments on commit 6d434de

Please sign in to comment.