钥匙串中的macOS安装程序证书评估错误:扩展密钥用法无效 [英] macOS installer certificate evaluation error in Keychain: Invalid Extended Key Usage

查看:286
本文介绍了钥匙串中的macOS安装程序证书评估错误:扩展密钥用法无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我生成了用于代码签名的mac installer证书,但收到一个错误,阻止我使用证书对安装程序进行签名

I generated a mac installer certificate for use with code signing and am getting an error that is preventing me from using certificate to sign installer

在评估钥匙串访问中的证书时,出现错误:无效的扩展密钥用法.

When evaluating certificate in keychain access, I got an error: Invalid Extended Key Usage.

这是尝试评估安装程序证书进行代码签名时的错误序列.

Here is the sequence of errors when trying to evaluate an installer certificate for code signing.

推荐答案

我发现用Xcode生成代码签名密钥时,而不是直接通过Keychain访问应用程序时,此过程效果更好.这将帮助您针对正在开发的应用程序类型使用正确的配置和签名参数来创建代码签名证书.如果您尚未在Apple拥有付费的开发人员帐户,则仍可以创建用于代码签名的自签名证书,以生成已签名的应用程序,而无需将其上传到应用程序商店.

I find this process works better when generating code signing keys with Xcode rather than through the Keychain access app directly. This will help you create your code signing certificate with the correct provisioning and signing parameters for the type of app you are developing. If you don't yet have a paid developer account with Apple, you can still create a self signed certificate for code signing to generate signed apps without uploading them to app store.

首先,您必须将您的Apple ID添加到Xcode的帐户"偏好设置中.

  • 启动Xcode
  • 从导航栏中选择Xcode>偏好设置".
  • 在窗口顶部,选择帐户".
  • 单击左下角的+,然后选择添加Apple ID ...

将出现一个对话框.添加您的Apple ID和密码,然后选择登录.如果您没有帐户,则可以通过选择创建Apple ID来创建您的Apple ID.

从右侧栏中选择您的Apple ID和团队,然后单击View Details....

Select your Apple ID and your team from the right side bar, then click on View Details....

将出现一个对话框,您将在其中看到代码签名身份和配置文件.

对于iOS开发,请在签名标识下找到iOS DevelopmentiOS Distribution配置文件.

For iOS development, under the signing identities locate the iOS Development and iOS Distribution profiles.

  • 如果您尚未创建它们,则会在旁边看到一个Create按钮 他们.
  • 只需选择它,Xcode就会发出并下载您的代码签名 正确的开发人员证书参数为您提供身份 iOS应用开发.
  • 注意:如果您已经向开发者帐户发放了Code Signing Identities:您将在其旁边看到一个Reset按钮.您可以使用它发行新的证书,Xcode将生成并下载该证书,但是请注意,这将使以前的证书无效,因此只有在丢失那些文件或知道自己在做什么的情况下,才执行此操作!
  • If you have not created them you will see a Create button next to them.
  • Simply select it and Xcode will issue and download your code signing identities for you with the correct developer certificate params for iOS app development.
  • Note: If you already have Code Signing Identities issued to your developer account: you will see a Reset button next to them. You can issue new certificates with it, that Xcode will generate and download, however note that this will invalidate your previous certificate, so only do this if you've lost those files or if you know what you are doing!

以后,当所有功能都可以使用时,我还建议单击Xco​​de中的选项以允许它自动管理代码签名.每当证书过期时,它将自动更新您的证书,因此不会有额外的步骤来续订.此选项应该在您应用的常规项目设置中可用,也可以通过选择project > Targets > General > Signing

In future, once you have it all working I also suggest clicking the option in Xcode to allow it to automatically manage code signing. This will automatically renew your certification whenever it expires, so there won't be extra steps to renew. This option should be available in the general project settings of your app, it can also be reached by selecting project > Targets > General > Signing

希望对您有帮助,祝您好运!

Hope that helps you, best of luck!

这篇关于钥匙串中的macOS安装程序证书评估错误:扩展密钥用法无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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