-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Whenever there is an error in signWithKeyInSlot, there will also be an "Illegal callback invocation from native module. This callback type only permits a single invocation from native code.", after investigation there is a missing "return" in the code.
- (void)signWithKeyInSlot:(YKFPIVSlot)slot type:(YKFPIVKeyType)keyType algorithm:(SecKeyAlgorithm)algorithm message:(nonnull NSData *)message completion:(nonnull YKFPIVSessionSignCompletionBlock)completion {
NSError *padError = nil;
NSData *payload = [YKFPIVPadding padData:message keyType:keyType algorithm:algorithm error:&padError];
if (padError != nil) {
completion(nil, padError);
return; <--- missing this line
}
return [self usePrivateKeyInSlot:slot type:keyType message:payload exponentiation:false completion:^(NSData * _Nullable data, NSError * _Nullable error) {
completion(data, error);
}];
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels