ios 找不到 Apple 开发推送服务的私钥
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14614219/
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
Can't find private key for Apple Development Push Services
提问by Ken Yu
I've consulted many sources out there and still can't figure this out.
我已经咨询了很多资源,但仍然无法弄清楚这一点。
http://code.google.com/p/apns-php/wiki/CertificateCreation
http://code.google.com/p/apns-php/wiki/CertificateCreation
Basically after I download the Development Push SSL Certificate from the iOS Provisioning Portal > App IDS (with Enable for Apple Push Notification service selected) and I double click the certificate (filename aps_development.cer) to open it, the Keychain opens. I then select "login" and "Certificates" on the left panels. On the right panel I see "Apple Development IOS Push Services:..." and all instructions I've consulted so far have told me to "expand" this option by clicking the arrow next to the name to reveal the private key, but there is no expand option for this certificate. Can anyone help me find this private key? Did I download the wrong certificate?
基本上,在我从 iOS 供应门户 > App IDS(选择启用 Apple 推送通知服务)下载开发推送 SSL 证书并双击证书(文件名 aps_development.cer)打开它后,钥匙串打开。然后我在左侧面板上选择“登录”和“证书”。在右侧面板上,我看到“Apple Development IOS Push Services:...”,到目前为止我咨询的所有说明都告诉我通过单击名称旁边的箭头来“扩展”此选项以显示私钥,但是此证书没有扩展选项。谁能帮我找到这个私钥?我是否下载了错误的证书?
Thanks
谢谢
回答by nbsp
My problem was that, for somereason the various certs were being added to the 'System' keychain instead of the 'login' one.
我的问题是,由于某种原因,各种证书被添加到“系统”钥匙串而不是“登录”钥匙串。
By selecting 'login' and then adding them with the little '+' (next to the i) they've been added to the right place.
通过选择“登录”,然后使用小“+”(在 i 旁边)添加它们,它们已被添加到正确的位置。
回答by wspruijt
I noticed that the expand icon is actually visible when clicking on 'My Certificates' in the left menu (Keychain).
我注意到当单击左侧菜单(钥匙串)中的“我的证书”时,扩展图标实际上是可见的。
回答by Vaibhav Saran
What I faced, when I was creating CSR file, I was putting Common Name with a space. And the certificates created by this CSR file were not showing expand
arrow in the Keychain Access
我面临的是,当我创建 CSR 文件时,我在 Common Name 中放置了一个空格。并且此 CSR 文件创建的证书expand
在Keychain Access
After I made a new CDR File with a short common name and recreated certificates, it installed well and has a private key.
在我用一个简短的通用名称制作了一个新的 CDR 文件并重新创建了证书后,它安装得很好并且有一个私钥。
回答by Nitin Alabur
on the machine you are trying to access this cert, do you have the key with which you signed the Certificate Signing Request (based on which apple created that certificate for you)?
在您尝试访问此证书的机器上,您是否拥有用于签署证书签名请求的密钥(基于哪个苹果为您创建了该证书)?
You should ask the person who created that certificate. Thats probably the only way you can get the private key.
您应该询问创建该证书的人。那可能是您获得私钥的唯一方法。
回答by Tim O'Neil
I had the exact same problem. Double-clicking the .cer file put the certificate in the Keychain, but did not show any private key (nor was the entry expandable).
我有同样的问题。双击 .cer 文件将证书放入钥匙串中,但没有显示任何私钥(条目也不能展开)。
I fixed the issue with these steps:
我通过以下步骤解决了这个问题:
- Quit keychain access.
- right-click the .cer file (e.g. aps_production.cer)
- Select "Open With > Keychain access (default)"
- 退出钥匙串访问。
- 右键单击 .cer 文件(例如 aps_production.cer)
- 选择“打开方式>钥匙串访问(默认)”
... and voila, now it shows up with the private key. Which is rather odd, since it was opening Keychain access anyways.
……瞧,现在它显示了私钥。这很奇怪,因为它无论如何都打开了钥匙串访问。
回答by user619237
Goto the keychain access and follow steps as given below...
转到钥匙串访问并按照以下步骤操作...
回答by RomeoF
Delete the certificate that has no private key. Open Login in Keychain, then drag the file from Finder to Login and your certificate now has a private key!
删除没有私钥的证书。在钥匙串中打开登录,然后将文件从 Finder 拖到登录,您的证书现在有一个私钥!
回答by Luda
I was just double clicking on the certificate. What helped me eventually was to dragthe certificate into the relevant section.
我只是双击证书。最终帮助我的是将证书拖到相关部分。
More details can be found in this blog: How to Export a Push Notification Certificate in a p12 file?
可以在此博客中找到更多详细信息:如何在 p12 文件中导出推送通知证书?
回答by Sam
回答by Angad
Leaving this here in the hope that it helps somebody with similar symptoms - When you click aps.cer
for opening it with Keychain Assistant, it prompts you with a dialog to select a keyring to import the Certificate into. For me, the private key didn't show up in a collapsible for any other keyring than login
(i.e. others such as System
or System Roots
seemed to show only the Certificate).
把它留在这里,希望它可以帮助有类似症状的人 - 当你点击aps.cer
使用钥匙串助手打开它时,它会提示你一个对话框来选择一个密钥环来导入证书。对我来说,私钥没有出现在任何其他密钥环的可折叠中login
(即其他密钥环,例如System
或System Roots
似乎只显示证书)。