Hi
I am using SecKeyCreateSignature to sign the data. It works for most users but for some iOS 13 users we are getting following fatal exception:
Fatal Exception: NSInternalInconsistencyException
Unexpected sessionID mismatch
Here's the stack trace. The crash was happened inside "SecKeyCreateSignature".
CoreFoundation __exceptionPreprocess
...
...
Security SecKeyCreateSignature
MyApp MyHelper.m - [MyHelper signature:withKey:err:]
...
I've copy the code snippet below:
-(NSData*)signature:(NSData*)plainData withKey:(SecKeyRef)privateKey err:(UAF_ErrorCode*)errorCodeBack
{
NSError *error;
NSData *signature = CFBridgingRelease(SecKeyCreateSignature(privateKey, kSecKeyAlgorithmECDSASignatureMessageX962SHA256, (CFDataRef)plainData, (void *)&error));
if (error) {
//some error handling code...
return nil;
}
return signature;
}
Based on our crash log, it seems this exception happened only on some (not all) iOS 13 users (13.3.0 - 13.3.4).
I can't find any information about this error "NSInternalInconsistencyException: Unexpected sessionID mismatch".
Are there any problems with my code or this is a known issue on iOS 13?
I would appreciate it if someone can provide any insight on the issue.
Thanks