Since this thread was last active I’ve handled a number of DTS TSIs about this errSecNotAvailable
error. So far all the errors have been associated with a log entry like this:
type: default
time: 2021-03-02 14:30:55.255111 +0300
process: kernel
category: <Missing Description>
message: AppleSEPKeyStore:10708:108: operation failed (sel: 43 ret: e007c007)
AppleKeyStore (AKS) is a kernel component that wrangles keys, including keys protected by the Secure Enclave. That e007c007
error translates to ‘bad device key’, which indicates that the device has got itself into a state where AKS is unable to unwrap a key.
It’s not clear how this happened. Apple has various bugs on file about this (r. 75428695) but the very rare occurrence of it makes it hard to debug. If you see this happen on a device you control, please trigger a sysdiagnose log as soon as possible and file a bug with that.
From a developer perspective there’s nothing you can do to recover the keychain item. For example, restarting the device won’t help. Based on my conversations with other developers, it seems that you can clear this error by deleting and re-creating the keychain item whose access is failing in this way. In a lot of cases that simply involves re-running the enrolment process in your app.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"