Hi. I'm dealing with an issue trying to retrieve SmartCard certificates from the app. I'm getting status -25300 (errSecItemNotFound) for SecItemCopyMatching when the smartcard is connected. The FW Security and SecurityInterfaces are add to the project. This is the code
OSStatus nStatus;
static const void* kKeys[] = {
kSecClass, kSecMatchLimit, kSecReturnRef, kSecAttrCanSign
};
static const void* kValues[] = {
kSecClassIdentity, kSecMatchLimitAll, kCFBooleanTrue, kCFBooleanTrue
};
osxObject<CFDictionaryRef> query(CFDictionaryCreate(
kCFAllocatorDefault, kKeys, kValues, 4,
&kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
CFArrayRef result;
OSStatus status = SecItemCopyMatching(query.get(),(CFTypeRef *)&result);
//status retrieved is -25300
Why the status my be -25300 even when the smart card if configured and connected? Thanks