简体   繁体   English

钥匙串中出现问题:iPhone 分发证书不受信任

[英]Getting issue in keychain: iPhone Distribution Certificate is not trusted

I'm working on iOS enterprise application, now our iOS distribution certificate is expired and I'm creating new certificate using below steps:我正在开发 iOS 企业应用程序,现在我们的 iOS 分发证书已过期,我正在使用以下步骤创建新证书:

  1. Create certificate sigining request from keychain access.从钥匙串访问创建证书签名请求。
  2. Login with developer.apple.com and generate distribution certificate using certificate sigining request.登录 developer.apple.com 并使用证书签名请求生成分发证书。
  3. download new iOS distribution certificate and install.下载新的 iOS 分发证书并安装。

After this I'm able to see iOS Distribution certificate in keychain access but getting error: "iPhone Distribution certificate is not trusted".在此之后,我可以在钥匙串访问中看到 iOS 分发证书,但出现错误: “iPhone 分发证书不受信任”。

在此处输入图像描述

Also, I have tried it using Automatically manage signing, and tried to export ipa file, but I'm getting below error:另外,我尝试过使用自动管理签名,并尝试导出 ipa 文件,但出现以下错误:

在此处输入图像描述

Please help me to resolve this errors.请帮我解决这个错误。

Just download the certificate from here and install it.只需从此处下载证书并安装即可。 If that doesn't works have a look on https://developer.apple.com/de/support/expiration/ .如果这不起作用,请查看https://developer.apple.com/de/support/expiration/

https://developer.apple.com/de/support/expiration/ should be the answer. https://developer.apple.com/de/support/expiration/应该是答案。 Just install the certificate manually or upgrade to Xcode 11.4.1 or later.只需手动安装证书或升级到 Xcode 11.4.1 或更高版本。 After upgrading to Xcode >= 11.4.1 I had to open a Xcode project and had to wait few seconds.升级到 Xcode >= 11.4.1 后,我不得不打开一个 Xcode 项目并且不得不等待几秒钟。 Afterwards the new Apple Worldwide Developer Relations Intermediate Certificate automatically has been installed.之后自动安装了新的 Apple 全球开发者关系中级证书。

I also had the similar issue:我也有类似的问题:

iphone开发者证书不受信任

It's because :这是因为 :

Issued by: Apple Worldwide Developer Relations Certification Authority颁发机构:Apple 全球开发者关系认证机构

Try the following steps to resolve this issue.请尝试以下步骤来解决此问题。

  • You need renewed certificate, please click this link to get it: https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer您需要更新证书,请点击此链接获取: https ://www.apple.com/certificateauthority/AppleWWDRCAG3.cer

  • Open the terminal, enter the file directory, then install the new certificate with this command:打开终端,进入文件目录,然后使用以下命令安装新证书:

     sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain AppleWWDRCAG3.cer

Reference : https://github.com/actions/virtual-environments/issues/1620参考: https ://github.com/actions/virtual-environments/issues/1620

I literally wasted 1 week solving this error and First i got code sign errors even on sample app created from Xcode after 4 days landed to this page and discovered that i need to add apple developer certificate to my keychain.我实际上浪费了 1 周的时间来解决这个错误,首先我得到代码签名错误,即使在 4 天后从 Xcode 创建的示例应用程序登陆到此页面并发现我需要将苹果开发人员证书添加到我的钥匙串中。 Which you can find here But doing this only will not completely solved my error.你可以在这里找到但是这样做并不能完全解决我的错误。 I got further error Which was only 7 days old as of now.我得到了进一步的错误,到目前为止只有 7 天。 https://developer.apple.com/forums/thread/673846 https://developer.apple.com/forums/thread/673846

So i again went to https://developer.apple.com/de/support/expiration/ page and found that if we have Xcode less than 11.4 or in some cases OS is not Big Sur then we will not be able to sign the app.所以我再次去了https://developer.apple.com/de/support/expiration/页面,发现如果我们的 Xcode 小于 11.4 或者在某些情况下操作系统不是 Big Sur,那么我们将无法签署应用程序。

Known Issues已知的问题

Xcode 11.4.0 and earlier may not be able to sign software using signing certificates issued by the new Apple Worldwide Developer Relations Certification Intermediate Certificate. Xcode 11.4.0 及更早版本可能无法使用新的 Apple Worldwide Developer Relations Certification Intermediate Certificate 颁发的签名证书对软件进行签名。 If you're unable to upgrade to a supporting version of macOS or Xcode on your build machine, you can build and archive your app using an earlier Xcode client and sign it for distribution using the latest release.如果您无法在构建机器上升级到支持的 macOS 或 Xcode 版本,您可以使用较早的 Xcode 客户端构建和归档您的应用程序,并使用最新版本对其进行签名以进行分发。 Alternatively, you can utilize the codesign tool to sign your software using the command line.或者,您可以利用 codesign 工具使用命令行对您的软件进行签名。

So you need to upgrade to xcode > 11.4 other wise you may not able to sign the app.所以你需要升级到 xcode > 11.4 否则你可能无法签署应用程序。

The current Apple Worldwide Developer Relations Certification Intermediate Certificate (intermediate certificate) is set to expire on February 7, 2023. The renewed certificate will be used to sign new software signing certificates issued after January 28, 2021 for the Apple Developer Programs.目前的 Apple Worldwide Developer Relations Certification Intermediate Certificate(中级证书)将于 2023 年 2 月 7 日到期。更新后的证书将用于签署 2021 年 1 月 28 日之后为 Apple Developer Programs 颁发的新软件签名证书。 Remaining service certificates will be updated in the future and this page will be updated to reflect additional certificate changes.其余服务证书将在未来更新,此页面将更新以反映其他证书更改。

https://developer.apple.com/support/expiration/ https://developer.apple.com/support/expiration/

For me it's a recurring issue ^$&#%^ ...对我来说,这是一个反复出现的问题^$&#%^ ...

It seems the old Apple Worldwide Developer Relations Certification Intermediate Certificate which expires 2023 is automatically coming back (triggered by I-don't-know-what) and sometimes leads to my developer certificate getting untrusted.似乎 2023 年到期的旧Apple Worldwide Developer Relations Certification Intermediate Certificate会自动恢复(由我不知道是什么触发),有时会导致我的开发者证书不受信任。

I suppose sometimes the system accidentally tries to authorise the dev certificate with the 2023 relations certificate instead of the newer one which expires 2030 and then sets the state to untrusted .我想有时系统会不小心尝试使用 2023 关系证书而不是更新的证书来授权开发证书,后者在 2030 年到期,然后将状态设置为untrusted

The easiest (but still annoying) solution in that case is just to remove the 2023 relations certificate from the keychain, the dev certificate then gets trusted again.在这种情况下,最简单(但仍然很烦人)的解决方案就是从钥匙串中删除 2023 关系证书,然后开发证书再次被信任。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM