Skip to content

tls: failed to verify certificate: SecPolicyCreateSSL error: 0 when running http call from child process #66709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
NorseGaud opened this issue Apr 7, 2024 · 1 comment

Comments

@NorseGaud
Copy link

Go version

go version go1.22.2 darwin/arm64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/nathanpierce/Library/Caches/go-build'
GOENV='/Users/nathanpierce/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/nathanpierce/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/nathanpierce/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/go/1.22.2/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.22.2/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.2'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/nathanpierce/go-daemon/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/vt/byhkgjmd4pq6v8j2f9tsghf40000gn/T/go-build3454563593=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

Using https://github.com/NorseGaud/go-daemon
I run go run examples/cmd/gd-signal-handling/signal-handling.go, which creates child processes that run a basic https GET call to google. Side note: go run examples/cmd/gd-signal-handling/signal-handling.go -s quit to stop it.

What did you see happen?

In the sample.log created, you'll see

2024/04/07 09:11:02 - - - - - - - - - - - - - - -
2024/04/07 09:11:02 daemon started
1
2024/04/07 09:11:03 error making GET request to google.com err Get "https://google.com": tls: failed to verify certificate: SecPolicyCreateSSL error: 0
1
2024/04/07 09:11:04 error making GET request to google.com err Get "https://google.com": tls: failed to verify certificate: SecPolicyCreateSSL error: 0
1
2024/04/07 09:11:05 error making GET request to google.com err Get "https://google.com": tls: failed to verify certificate: SecPolicyCreateSSL error: 0
1
2024/04/07 09:11:06 error making GET request to google.com err Get "https://google.com": tls: failed to verify certificate: SecPolicyCreateSSL error: 0
1
2024/04/07 09:11:07 error making GET request to google.com err Get "https://google.com": tls: failed to verify certificate: SecPolicyCreateSSL error: 0
2024/04/07 09:11:08 terminating...
2024/04/07 09:11:08 daemon terminated

What did you expect to see?

It working :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants