-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
crypto/x509: Get "https://google.com": tls: failed to verify certificate: SecPolicyCreateSSL error: 0 when running in child after parent exits #68557
Comments
Sounds like you reported this before as #66709 with the conclusion that it's an Apple bug. I don't think there's much Go can do about it. |
@seankhliao, no this is entirely different. That was a path issue which has been fixed. Please reopen. |
Reopening. The error returned by crypto/x509 in this case isn't helpful. It's peculiar that most of the code in crypto/x509/internal/macos/security.go returns an CC @golang/security That said this error may just be another case of #54590. |
Thanks @ianlancetaylor , I could definitely be misunderstanding something and it's possibly another case of 54590, but I thought I solved that by just calling the main.go with an absolute path. At least it went away until I started doing this daemonization stuff in the example above. |
THIS IS UNRELATED TO #66709
Go version
go version go1.22.5 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
I'm trying to create a child and then exit the parent so that I can create a daemon-like experience for my go application.
Here is the main.go you can reproduce with using
go run main.go
:What did you see happen?
Once ran, you'll see in test.log:
Now under the
parent
function, uncomment// time.Sleep(3 * time.Second)
and then run again.You should then see it working:
It seems as if the parent closing too soon is causing the child to not have, what I can only guess, is the proper environment available on linux and macOS.
Though, I'm not entirely sure why. I've tried digging into this as low level as I am aware of and nothing is clicking for me as to the cause. Does anyone know why this isn't possible?
What did you expect to see?
I would like the parent to be able to exit well before the child, so that I can use the golang binary as a controller for the daemon/service. But I also can't guarantee that https calls will happen before the parent exits.
The text was updated successfully, but these errors were encountered: