Using Cryptographic Assets Stored on a Smart Card
Access certificates, keys, and identities stored on a smart card as if they were part of the keychain.
Framework
- CryptoTokenKit
On This Page
Overview
A token is a storage repository for cryptographic items. When a token is present in the system—such as when the user physically inserts a smart card into a USB slot
the CryptoTokenKit framework exposes the token’s items to your app as standard keychain items. It does this by copying the items to the keychain when the token is inserted, and deleting them from the keychain when the token is removed.
Because the items appear to your app as standard keychain items, you use Keychain Services to access them. All the usual rules for building a search query and parsing the search results apply. For an example of storing and retrieving keychain items, see Storing Keys in the Keychain. When you work with tokens, the CryptoTokenKit framework handles the storage. You only have to perform item retrieval.