Mac Code Signing: Bypass the Keychain Access private key prompt from Terminal

无人久伴 提交于 2019-12-05 15:44:32

问题


I'm working on an app in Mac OS X Mountain Lion that needs to access the private key of some of my certificates within the Keychain Access. Since this app is going to run on a server, I need to avoid the pop up dialog that requires the user to allow the app to access the private key:

I know that by clicking "Always Allow" the dialog won't popup anymore for that private key, the problem is that I will be working with different keys.

Thanks in advance,

Mikywan.


回答1:


The only way I found to solve this is by setting up the Private Key in the Keychain Access to "Allow all applications to access this item".

You can configure this from the Terminal when you import the certificate into your Keychain.

Import command: import inputfile [-k keychain] [-t type] [-f format] [-w] [-P passphrase] [options...]

To set the access control to "Allow all applications to access this item", just add the flag "-A".

You can check always Apple's manual on security

Hope this helps.



来源:https://stackoverflow.com/questions/14733764/mac-code-signing-bypass-the-keychain-access-private-key-prompt-from-terminal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!