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.

Answered by DTS Engineer in 903671022

Thanks for filing FB24553094.

unless of course there is a great reason not too.

I don’t think there’s any specific reason why we wouldn’t fix this, but I can’t offer any specific timeline.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for filing FB24553094.

unless of course there is a great reason not too.

I don’t think there’s any specific reason why we wouldn’t fix this, but I can’t offer any specific timeline.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

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