Security.framework returns NULL from SecPolicyCreateSSL when the directory containing the running executable no longer exists.

https://feedbackassistant.apple.com/feedback/24553094

Security.framework returns NULL from SecPolicyCreateSSL when the directory containing the running executable no longer exists. That commonly happens with "go run" after the go command deletes its temporary build directory while a child process is still running.

More details on how to reproduce: https://github.com/golang/go/issues/68557

Golang team rejected my workaround https://github.com/golang/go/pull/80471/changes so we're relying on the macOS team to allow this, unless of course there is a great reason not too.

This is problematic when developing applications in golang, especially daemons.

Security.framework returns NULL from SecPolicyCreateSSL when the directory containing the running executable no longer exists.
 
 
Q