Add codesign to private key ACL without Keychain

六眼飞鱼酱① 提交于 2019-11-30 02:05:13
David Boike

Normally the "cleansed" version of the file system that the Keychain's Get Info dialog presents to you won't allow you to access the hidden /usr/bin directory, but I found a way around this.

  1. Get normal Finder windows to show all files. If you aren't aware of how to do this, check out this article.
  2. In a normal Finder window, navigate to /usr/bin
  3. Drag bin over to the Places area in the sidebar. Now bin is a shortcut you can access from anywhere.
  4. From within the Keychain's Get Info -> Access Control pane, click the "+" button to open the find application dialog.
  5. Click the bin that is now under the Places on this sidebar.
  6. Navigate to and select codesign.
  7. Click the Save Changes button.

Just registred to say THANK you very much, David Boike. Great workaround that helped me a lot. But there is a better way to do this.

Open File Dialog press 'Cmd' + 'Shift' + '.'

That combination should toggle visibility of hidden items on file system. If combination was not effective, try to change presentation mode to 'list' or 'grid' and try it again.

Thanks and good luck!

I found a solution by doing an applescript that "Clicks" the "Always Allow" button after having no luck with security or certtool for adding the ACL privileges.

#!/usr/bin/osascript
tell application "System Events"
  tell window 1 of process "SecurityAgent"
    click button "Always Allow" of group 1
  end tell
end tell

Ok this took me almost half a day to figure out but I now have it working. I was following this article.

The article shows adding the cert like this with the -A option but this didn't work for me.

security import "ADistribution.p12" -k appledev -f pkcs12 -A -P ""

This question mentioned the -T option which did work for me.

security import "Distribution.p12" -k appledev -f pkcs12 -P "" -T /usr/bin/codesign
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!