gpt4 book ai didi

ios - Codesign 和 Ambiguous identity,匹配 "Mac Developer"和 "iPhone Developer"

转载 作者:可可西里 更新时间:2023-11-01 05:11:27 25 4
gpt4 key购买 nike

我正在对库进行发布测试。该过程需要在越狱的 iOS 设备上进行测试。为此,我使用运行 iOS 5.1 越狱的旧 iPad 1 RedSn0w .

RedSn0w不修补 Gatekeeper 服务(代码签名),所以我需要使用我的开发者帐户并签署我正在测试的二进制文件(Absinthe 确实修补 Gatekeeper,这就是为什么你可以使用 ldid 生成虚假签名).

尝试登录结果:

$ codesign -s "John Doe" cryptest.exe 
John Doe: ambiguous (matches "Mac Developer: John Doe (3VT8SJ9C5)" and "iPhone Developer:
John Doe (3VT8SJ9C5)" in /Users/jdoe/Library/Keychains/login.keychain)

我通过了codesign(1) ,但我不知道如何解决它,因为它们是相同的 KeyID。使用 KeyID 会产生相同的消息。

如何在签署可执行文件时消除歧义?

最佳答案

不明确的证书

当钥匙串(keychain)中存在两个相同身份的证书时,会发生这种情况:

协同设计工具要求只有一个。

NOTE: The mention of ldid in your question might need a bit more clarification as to how it relates to your Apple issued codesigning certificates, or what the concern there is exactly.

重复的证书有时会出现在钥匙串(keychain)中,这是因为一个证书已过期但从未被删除。 Apple 有一些解决此类问题的说明,但如果以下方法不起作用,您可能需要稍微超出正常程序来解决它:

  1. 在 Keychain Access 中,确保您的“查看”菜单 > 显示过期证书选项已打开
  2. 单击“证书”“类别”,然后单击“钥匙串(keychain)访问”中“钥匙串(keychain)”侧边栏中列出的每个钥匙串(keychain)。如果您看到任何重复项,甚至是过期的证书,请删除这些重复项。
  3. 点击钥匙串(keychain)访问中的“ key ”“类别”。
  4. 浏览每个钥匙串(keychain),查找并删除任何与受影响的证书具有相同通用名称的“孤立 key ”。孤立 key 是不受披露三角绑定(bind)到当前存在于钥匙串(keychain)中的 iPhone 开发者或 iPhone 分发证书的 key 。
  5. 如果您找到并删除了任何额外的 key 或证书,请重新尝试构建。
  6. 如果删除所有事件的或过期的具有相同公用名称的重复证书或 key 后问题仍然存在,您可以尝试删除所有现有的签名证书和 key ,并使用中的步骤将其替换为新的如何删除/撤销我的证书并重新开始?
  7. 最后,如果创建新证书后错误仍然存​​在,请按住 Control 键并单击钥匙串(keychain)访问中受影响的证书,选择“新身份首选项”并单击“证书”字段。如果您看到此处列出的重复证书,这是 Keychain Access 的一个已知且不常见的问题。要解决此问题,请尝试以下操作:

    钥匙串(keychain)访问 > 编辑 > 钥匙串(keychain)列表,取消选中登录钥匙串(keychain)的“共享”。

如果返回钥匙串(keychain)列表,您发现登录钥匙串(keychain)仍标记为共享,请创建以下文件的备份,然后将其删除(如果存在):

    /Library/Preferences/com.apple.security-common.plist
~/Library/Preferences/com.apple.security.plist

然后重试您的构建...

If you fail to resolve the issue by the steps above then try searching for one of the certificates listed in the error message. Once you find the certifcate in question delete either the expired one, or the one that is conflicting with the one you need.


多个协同设计证书(不是重复的)

如果您有多个协同签名证书,您需要使用 -s 选项指定要使用的证书(如果是从命令行进行协同签名):

codesign -s <certificate name> -vvvv foo.app

-s, --sign identity Sign the code at the path(s) given using this identity. See SIGNING IDENTITIES in man codesign.

可选:

-v, --verify Requests verification of code signatures. If other actions (sign, display, etc.) are also requested, -v is interpreted to mean --verbose.

例如,在您的情况下:

codesign -s "iPhone Developer: John Doe" cryptest.app

关于ios - Codesign 和 Ambiguous identity,匹配 "Mac Developer"和 "iPhone Developer",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32925844/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com