macos 在钥匙串访问中生成证书签名请求:使用哪个私钥?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7947314/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Generating certificate signing request in Keychain Access: which private key is used?
提问by arnekolja
I am wondering which private key Keychain Access in Mac OS X (Snow Leopard, now Lion) uses. Whenever I create a CSR using that app, it does not even ask for a private key to use. So which one does it use then?
我想知道 Mac OS X(Snow Leopard,现在是 Lion)中使用哪个私钥 Keychain Access。每当我使用该应用程序创建 CSR 时,它甚至不会要求使用私钥。那么它使用哪一个呢?
I could imagine that it used the selected one, ifyou've selected one in your certificate list. But generating the request even works when nothing is selected at all or, making sure it's not an "invisible" selection, if the item that's selected is not a private key.
如果您在证书列表中选择了一个,我可以想象它使用了选定的一个。但是,即使没有选择任何内容,或者如果选择的项目不是私钥,请确保它不是“不可见”的选择,生成请求甚至可以工作。
Does anyone know?
有人知道吗?
Thanks in advance
提前致谢
Arne
阿恩
回答by Rob Napier
It generates a new public/private keypair when you create a CSR in Keychain Access. The name of the key will be what you entered in the "Common Name" field when generating the CSR.
当您在 Keychain Access 中创建 CSR 时,它会生成一个新的公钥/私钥对。密钥的名称将是您在生成 CSR 时在“通用名称”字段中输入的名称。
If you would like to generate a new CSR from an existing key, I do not believe this can be done entirely within Keychain Access. For how to do it with Keychain Access and OpenSSL, see How can I use an existing private key to a new iOS development certificate?
如果您想从现有密钥生成新的 CSR,我认为这不能完全在 Keychain Access 中完成。有关如何使用 Keychain Access 和 OpenSSL 执行此操作,请参阅如何将现有私钥用于新的 iOS 开发证书?
回答by Sjors Provoost
If you open the resulting certificate on your Mac, it will be added to your Keychain. When you unfold it, you'll the associated private key.
如果您在 Mac 上打开生成的证书,它将被添加到您的钥匙串中。当您展开它时,您将获得关联的私钥。