从备份重新安装 .cer Apple "Developer ID Installer" 证书
Re-install .cer Apple "Developer ID Installer" certificates from a backup
假设 Apple 开发人员计划会员资格已过期,因此无法从 Apple 网站申请新的代码签名证书。我仍然有备份:
developerID_application.cer
,developerID_installer.cer
(有效期为2024,所以仍然有效)
- 2 年前的一个
CertificateSigningRequest.certSigningRequest
文件,与 .cer 文件完全同时创建
如何在新的 Mac 安装中安装这些证书,以便我们可以使用 productsign
来签署 .pkg 安装程序?
这是我尝试过的:
- 导入“系统”Keychain中的.cer文件,好像成功了
- 在我创建这些证书时使用的钥匙串中导入 AppleWWDRCA.cer (https://developer.apple.com/certificationauthority/AppleWWDRCA.cer),同上
productsign --sign "Developer ID Installer: MyName" myinstaller.pkg myinstaller_signed.pkg
结果:
productsign: error: Could not find appropriate signing identity for "Developer ID Installer: MyName"
我查看了 OS X productsign error: Could not find appropriate signing identity 但它在这里没有帮助:我只有 2 个 .cer 文件和 .certSigningRequest 文件。我没有另一个私钥文件。此外,当我打开 .certSigningRequest 文件时,我看到:
Please specify the issuing Certificate Authority for MyName's certificate request
Issuing CA: Let me choose
What would you like to do?
Create a certificate for yourself
Create a CA
Use your CA to create a certificate for someone else
Request a certificate from an existing CA
Set the default CA
View and evaluate certificates
如何处理之前的 .certSigningRequest 文件?
如果您只有 3 个命名文件,您无能为力。
- *.cer,就是 public 密钥和其他人(CA)签名的一些属性。
- *.certSigningRequest,从名称猜想,是一个 PKCS#10 - public 密钥和一些请求由其他人(CA)签名的属性。
你需要的是私钥
如果您有系统运行或完整的系统映像备份(待恢复),私钥在钥匙串中(~/Library/Keychains/login.keychain-db) 您可以导出它们以移动到另一个系统:
- 开始XCode.
- 在菜单中单击
Xcode
> Preferences
。
- 单击
Accounts
(window 的顶部)。
- 单击
gear icon
(lower-left 角中删除按钮的右侧)。
- 从 pop-up 菜单中选择
Export Developer Accounts
。
- Xcode encrypts/password-protects 导出的文件 (*.developerprofile).
假设 Apple 开发人员计划会员资格已过期,因此无法从 Apple 网站申请新的代码签名证书。我仍然有备份:
developerID_application.cer
,developerID_installer.cer
(有效期为2024,所以仍然有效)- 2 年前的一个
CertificateSigningRequest.certSigningRequest
文件,与 .cer 文件完全同时创建
如何在新的 Mac 安装中安装这些证书,以便我们可以使用 productsign
来签署 .pkg 安装程序?
这是我尝试过的:
- 导入“系统”Keychain中的.cer文件,好像成功了
- 在我创建这些证书时使用的钥匙串中导入 AppleWWDRCA.cer (https://developer.apple.com/certificationauthority/AppleWWDRCA.cer),同上
productsign --sign "Developer ID Installer: MyName" myinstaller.pkg myinstaller_signed.pkg
结果:
productsign: error: Could not find appropriate signing identity for "Developer ID Installer: MyName"
我查看了 OS X productsign error: Could not find appropriate signing identity 但它在这里没有帮助:我只有 2 个 .cer 文件和 .certSigningRequest 文件。我没有另一个私钥文件。此外,当我打开 .certSigningRequest 文件时,我看到:
Please specify the issuing Certificate Authority for MyName's certificate request
Issuing CA: Let me choose
What would you like to do?
Create a certificate for yourself
Create a CA
Use your CA to create a certificate for someone else
Request a certificate from an existing CA
Set the default CA
View and evaluate certificates
如何处理之前的 .certSigningRequest 文件?
如果您只有 3 个命名文件,您无能为力。
- *.cer,就是 public 密钥和其他人(CA)签名的一些属性。
- *.certSigningRequest,从名称猜想,是一个 PKCS#10 - public 密钥和一些请求由其他人(CA)签名的属性。
你需要的是私钥
如果您有系统运行或完整的系统映像备份(待恢复),私钥在钥匙串中(~/Library/Keychains/login.keychain-db) 您可以导出它们以移动到另一个系统:
- 开始XCode.
- 在菜单中单击
Xcode
>Preferences
。 - 单击
Accounts
(window 的顶部)。 - 单击
gear icon
(lower-left 角中删除按钮的右侧)。 - 从 pop-up 菜单中选择
Export Developer Accounts
。 - Xcode encrypts/password-protects 导出的文件 (*.developerprofile).