Mac Code Signing: Bypass the Keychain Access priva

2020-07-05 06:39发布

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:

Pop up dialog

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条回答
太酷不给撩
2楼-- · 2020-07-05 07:26

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".

Private Key Properties: Access Control

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.

查看更多
登录 后发表回答