ios 导出开发证书为p12

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14954074/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 22:21:26  来源:igfitidea点击:

Export development certificate as p12

ioscertificateexport

提问by Tomzie

I downloaded a personal development certificate from the Apple Developer center and imported it to my keychain. Now, I want to export it as a .p12 file and encrypt it with a password. When I right click the certificate in the Keychain tab Certificates, and press the Export button, the .p12 option is not highlighted/available. Instead of the other 3 options (.cer, .pem, .p7b), which are available.

我从 Apple 开发人员中心下载了个人开发证书并将其导入到我的钥匙串中。现在,我想将其导出为 .p12 文件并使用密码对其进行加密。当我右键单击钥匙串选项卡证书中的证书,然后按导出按钮时,.p12 选项未突出显示/不可用。而不是可用的其他 3 个选项(.cer、.pem、.p7b)。

I tried a couple of things yet, like adding the Apple ID, which was used to create the certificate, to System preferences->Users and Groups->My account, but that didn't solve it. The certificate was created on a different Macbook than I'm using now.

我还尝试了几件事,例如将用于创建证书的 Apple ID 添加到系统首选项-> 用户和组-> 我的帐户,但这并没有解决它。该证书是在与我现在使用的 Macbook 不同的 Macbook 上创建的。

Is it possible to export it as a .p12 in any way?

是否可以以任何方式将其导出为 .p12?

回答by Seva Alekseyev

One point of interest: the Keychain Assistant window has a "Category" list in the lower part of the left panel. You can only export a p12 from the "Certificates" view.

一个兴趣点:钥匙串助手窗口在左侧面板的下部有一个“类别”列表。您只能从“证书”视图中导出 p12。

In the "All" view, you can see the certificates and the keys alongside, so that they're distinct items with no possibility of multiple selection; in the Certificates view, there's a tree structure with keys as child items of certificates, so that selecting a certificate implicitly selects the corresponding private key too.

在“全部”视图中,您可以看到旁边的证书和密钥,因此它们是不同的项目,无法进行多项选择;在 Certificates 视图中,有一个树结构,其中密钥作为证书的子项,因此选择证书也隐含地选择了相应的私钥。

回答by tom

The missing .p12option means that you only have either the private key or the certificate on your machine. You need both of these to generate a .p12(and incidentally, you'll need both the private key and certificate to sign your apps).

缺少的.p12选项意味着您的机器上只有私钥或证书。您需要这两个来生成一个.p12(顺便说一句,您需要私钥和证书来签署您的应用程序)。

So, find out which of these you're missing, add the missing piece to Keychain, and the .p12option will be available.

因此,找出您缺少哪些部分,将缺少的部分添加到钥匙串,然后该.p12选项将可用。

回答by FastWinder

You can check in your keychain whether the private key is associated with the development certificate. You can export the private key and certificate as .p12 only if it is there.

您可以在您的钥匙串中检查私钥是否与开发证书相关联。仅当私钥和证书存在时,您才能将其导出为 .p12。

回答by Savvy iPhone

Just select Certificate from the left panel to export it as .p12Just select Certificate from the left panel to export it as .p12

只需从左侧面板中选择证书即可将其导出为 .p12只需从左侧面板中选择证书即可将其导出为 .p12