在OSX 10.10.3中导入单个证书后的身份重复 [英] Duplicate identity after importing single certificate in OSX 10.10.3

查看:104
本文介绍了在OSX 10.10.3中导入单个证书后的身份重复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使仅安装了一个身份,该操作系统似乎也无法正确列出多个身份.

The OS seems to be incorrectly listing multiple identities, even though only one was installed.

这是我的钥匙串(安全列表钥匙串)

"/Users/mateuscb/Library/Keychains/login.keychain"
"/Library/Keychains/System.keychain"

我列出身份,然后返回零身份.

I list identities, and it comes back with zero identies.

然后我通过以下命令行将其导入:

I then import it via the following command line:

security import "~/mycert.p12" -k "/Users/mateuscb/Library/Keychains/login.keychain" -t cert -f pkcs12 -P password`

当我列出身份时,我现在得到以下信息(安全性查找身份):

When I list identities, I now get this (security find-identity):

Valid identities only
 1) 7E0B7E829EBF27EEC57CC796F948D7C2D9A91330 "Developer ID Application: The Company Inc."
 2) 7E0B7E829EBF27EEC57CC796F948D7C2D9A91330 "Developer ID Application: The Company Inc."

更奇怪的是,如果指定了钥匙串,我只会得到一个( security find-identity login.keychain ).而且System.keychain始终为空.

even more weird, is if specifying the keychain, I only get one (security find-identity login.keychain). And the System.keychain is always empty.

我还多次搁置了钥匙串(可访问KeyChain).

I've also rest my keychains (KeyChain access) multiple times.

推荐答案

事实证明,其原因是由于先前不正确的导入将我的证书的私钥留在了System Keychain中.我去了System Keychain并删除了证书,以为它删除了私钥,但实际上并没有.

As it turns out, the reason for this was caused by the private key of my certificate left behind in the System Keychain from a previous incorrect import. I went and deleted the cert from the System Keychain thinking it deletes the private key, when in fact it doesn't.

实际上是另一篇文章的答案,这使我对删除证书而不删除证书的想法有所了解.私钥.即使在视觉上,它也会显示其下的私钥.

It was actually the answer to another post that enlightened me to the notion that deleting the cert, does not delete the private key. Even though visually it shows the private key under it.

这篇关于在OSX 10.10.3中导入单个证书后的身份重复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆