Posts

Post not yet marked as solved
6 Replies
closes the lock screen password and reopens ,SecKeyCreateSignature error report unable to sign digestNSData *signature = CFBridgingRelease(SecKeyCreateSignature(privateKey, kSecKeyAlgorithmECDSASignatureMessageX962SHA256, (CFDataRef)data, (void *)&signatureError));Printing description of signatureError:Error Domain=CryptoTokenKit Code=-3 "setoken: unable to sign digest" UserInfo={NSLocalizedDescription=setoken: unable to sign digest, AKSError=-536363001}After replacing kSecAttrLabel, the problem disappeared, but this change will definitely not work. The next time someone closes the password and reopens it will still have this problem. I tested it with the official keychaindemo. The test steps are as follows:1. run keychaindemo project,click Add protected key, Turn off the lock screen password2. Open the lock screen password, there will be deleted fingerprint prompts, click to keep3. Open keychaindemo app, and then click Use protected key to reproduce the problem.
Post not yet marked as solved
2 Replies
closes the lock screen password and reopens ,SecKeyCreateSignature error report unable to sign digestNSData *signature = CFBridgingRelease(SecKeyCreateSignature(privateKey, kSecKeyAlgorithmECDSASignatureMessageX962SHA256, (CFDataRef)data, (void *)&signatureError));Printing description of signatureError:Error Domain=CryptoTokenKit Code=-3 "setoken: unable to sign digest" UserInfo={NSLocalizedDescription=setoken: unable to sign digest, AKSError=-536363001}