Post

Replies

Boosts

Views

Activity

Reply to Swift iOS iPadOS app for Smartcard Token PIV using CryptoTokenKit
Hi @DTS Engineer Quinn. I am new to swift development, and it's possible that I'm missing something fundamental/obvious. If so, I apologize in advance. I also realize that this post is a couple of years old - and perhaps outdated. However, I'm trying to accomplish something similar to what the original inquirer is asking for here, and thus far I haven't found anything recent that is as relevant as this post. The only difference is that I'm trying to use a PIV smart card to achieve authentication to a server rather than digitally signing a document. Unfortunately, I'm getting stuck when attempting to run the list() function you posted in the accepted answer above to simply list the certificates from the smart card. When attempting to call SecItemCopyMatching(), I'm getting a -34018 missing entitlement error. I've attempted to add the com.apple.token to my app's keychain-access-groups entitlements, but this does not resolve the issue. I have checked the entitlements in my built app, per your recommendation in the troubleshooting guide here: https://developer.apple.com/forums/thread/114456. The entitlement for com.apple.token is indeed present in the plist. Based on other documentation I've read, however, it seems that the explicit declaration of com.apple.token should not even be required in the entitlements. Is there something obvious that I'm missing here that would prevent my app from accessing the token access group?
Topic: Privacy & Security SubTopic: General Tags:
3w