如何将现有的私钥用于新的iOS开发证书? [英] How can I use an existing private key to a new iOS development certificate?

查看:226
本文介绍了如何将现有的私钥用于新的iOS开发证书?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于美学原因,我想使用我刚才创建我的分发证书时使用的相同的私钥,创建一个新的开发证书(我的旧证书已过期)。但是在iOS配置门户上的如何创建开发证书:需要您使用Keychain Access创建一个新的密钥。当我尝试做钥匙扣访问>证书助理>从证书授权中请求证书使用(我的键名)证书助手实际上不创建CSR文件。

For aesthetic reasons, I would like to use the same private key that I used to create my distribution certificate a while ago, to create a new development certificate (my old one expired). But the "How to create a development certificate:" on the iOS provisioning portal require that you use Keychain Access create a new key. When I try to do Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority With "(my key name)" the Certificate Assistant doesn't actually create a CSR file.

有没有人知道是否可以这样做,如果是这样,怎么办?

Does anyone know if this can be done, and if so, how?

推荐答案

来自keychain的私钥作为p12文件。

First, I had to export my private key from the keychain as a p12 file. I tried scripting this, but was unsuccessful.


  1. 打开钥匙串并选择您的私钥

  2. 右键 - 点击并选择导出

  3. 使用p12文件类型。

openssl命令将您的密码保护的p12文件转换为pem。 openssl将提示输入密码。

Run the following openssl command to convert your password-protected p12 file to a pem. openssl will prompt for a password.

openssl pkcs12 -in your-newly-exported-p12-file.p12 -out your-newly-exported-p12-file-as-a-pem.pem -nodes

运行以下命令在您的pem文件上生成csr。

Run the following command on your pem file to generate the csr.

openssl req -new -key your-newly-exported-p12-file-as-a-pem.pem -out your-csr-to-submit-to-apple.csr

这篇关于如何将现有的私钥用于新的iOS开发证书?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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