热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

备份恢复后,SecItemCopyMatching返回-26276-AfterbackuprestoreSecItemCopyMatchingreturns-26276

KeychainTouchIDappwasinstalledusingXcodeandexecuted.ThekeywasgeneratedbypressingAd
  1. KeychainTouchID app was installed using Xcode and executed. The key was generated by pressing "Add protected key" and it was used by pressing "Use protected key". The key was generated using Secure Enclave.
  2. KeychainTouchID应用程序是使用Xcode安装并执行的。通过按“添加受保护的密钥”生成密钥,按“使用受保护的密钥”即可使用密钥。密钥是使用Secure Enclave生成的。

  3. Encrypted iPhone backup on the computer was made using iTunes. All content and settings where erased (Settings -> General -> Reset -> Erase All Content and Settings).
  4. 计算机上的加密iPhone备份是使用iTunes制作的。删除的所有内容和设置(设置 - >常规 - >重置 - >删除所有内容和设置)。

  5. Encrypted iPhone backup was restored to the same iPhone.
  6. 加密的iPhone备份已恢复到同一iPhone。

  7. Reinstallation for KeychainTouchID app needed to do as it was instaled using Xcode.
  8. 需要重新安装KeychainTouchID应用程序,因为它是使用Xcode进行的。

  9. KeychainTouchID app was executed.
  10. KeychainTouchID应用程序已执行。

  11. So after that:
  12. 那之后:

By pressing "Use protected key" returns -26276 (AAPLKeychainTestsViewController.m @ 288 function -> SecItemCopyMatching)

按“使用受保护的密钥”返回-26276(AAPLKeychainTestsViewController.m @ 288函数 - > SecItemCopyMatching)

By pressing "Delete protected key" reutrns -4 (AAPLKeychainTestsViewController.m @ 326 function -> SecItemDelete)

通过按“删除保护键”重新加速-4(AAPLKeychainTestsViewController.m @ 326功能 - > SecItemDelete)

By pressing "Add protected key" returns success, but deletion and usage is not possible.

通过按“添加受保护的密钥”返回成功,但无法删除和使用。


I found here: errSecInternal = -26276, /* An internal error occured in the Security framework. */

我在这里找到:errSecInternal = -26276,/ *安全框架中发生内部错误。 * /

So in this case I can not access new added key.

所以在这种情况下我无法访问新添加的密钥。

  • Why after backup restore SecItemCopyMatching returns -26276?
  • 为什么在备份恢复后SecItemCopyMatching返回-26276?

  • Why it is not possible to delete this key, but it is possible to add?
  • 为什么不能删除此密钥,但是可以添加?

  • Dose sombody had this experience?
  • 剂量sombody有这种经历吗?

  • What is the way to go around this problem?
  • 解决这个问题的方法是什么?

I did post this issue to Apple team, but no answer for more than 1 month.

我确实将这个问题发布给了Apple团队,但是超过1个月没有答案。

1 个解决方案

#1


1  

I would repost the question on the security list. That said, from my distant memory, those keys are likely marked with ACLs that prevent them from getting backed up, so you're encountering the equivalent of a dangling pointer in the keychain. If you re-add an item with matching name or whatever, it replaces that item, and it should work from that point on.

我会在安全列表上重新发布这个问题。也就是说,从我遥远的记忆中,这些键可能标有ACL,阻止它们被备份,所以你遇到了等同于钥匙串中的悬空指针。如果您重新添加具有匹配名称或其他内容的项目,它将替换该项目,并且应该从该点开始工作。

However, if deleting it and using it fails after re-adding the item, something very strange is going on, in which case I would file a bug. They'll probably ask you to install a configuration profile that enables a crapton of debugging, reproduce the error, and send them logs.

但是,如果在重新添加项目后删除它并使用它会失败,那么会发生一些非常奇怪的事情,在这种情况下我会提交一个错误。他们可能会要求您安装配置文件,以便进行调试,重现错误并发送日志。


推荐阅读
author-avatar
文帅zssw
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有