agens-no / EllipticCurveKeyPair

Sign, verify, encrypt and decrypt using the Secure Enclave
Other
709 stars 115 forks source link

Error when signing or decrypting on Simulator (iOS 13) #46

Open fmessina opened 4 years ago

fmessina commented 4 years ago

Hi!

If I run the demo project on a simulator on iOS 13, whenever I try to perform a signature or decryption I get this error:

Error: authentication(error: __C_Synthesized.related decl 'e' for LAError(_nsError: Error Domain=com.apple.LocalAuthentication Code=-1 "Found public key, but couldn't find or access private key. The errSecItemNotFound error is sometimes wrongfully reported when LAContext authentication fails" UserInfo={NSLocalizedFailureReason=Found public key, but couldn't find or access private key. The errSecItemNotFound error is sometimes wrongfully reported when LAContext authentication fails, NSUnderlyingError=0x600003c582a0 {Error Domain=NSOSStatusErrorDomain Code=-25300 "Could not get key for query: ["r_Ref": true, "u_OpPrompt": "Sign transaction", "labl": "no.agens.sign.private", "kcls": 1, "class": keys, "u_AuthCtx": <LAContext: 0x60000275a040>]" UserInfo={NSLocalizedRecoverySuggestion=See https://www.osstatus.com/search/results?platform=all&framework=all&search=-25300, NSLocalizedDescription=Could not get key for query: ["r_Ref": true, "u_OpPrompt": "Sign transaction", "labl": "no.agens.sign.private", "kcls": 1, "class": keys, "u_AuthCtx": <LAContext: 0x60000275a040>]}}}))

Can it be related to the discussion in this thread? https://stackoverflow.com/questions/56700680/keychain-query-always-returns-errsecitemnotfound-after-upgrading-to-ios-13

hfossli commented 4 years ago

Does it work on device?

fmessina commented 4 years ago

Hi @hfossli Yes, on device it works fine.