Virtual smart card using CryptoTokenKit

We are developing a mac application. The purpose is to create a smart virtual card. This is the basic class

public class VirtualSmartCardDriver: TKTokenDriver {
   
  // Required initializer for TKTokenDriver
  override init() {
    super.init()
    print("VirtualSmartCardDriver initialized")
  }
}

Created a list and saved it on the location Library/Security/Tokens

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>DriverBundleIdentifier</key>
	<string>com.student.SignExtension</string>
	<key>TKTokenDriverClassName</key>
	<string>VirtualSmartCardDriver</string>
	<key>TKTokenClassName</key>
	<string>VirtualSmartCard</string>
	<key>TKTokenDriverTokenTypes</key>
	<array>
		<string>com.apple.token.smartcard</string>
	</array>
</dict>
</plist>


We installed a certificate in the Mac keychain that does not have its private key. We bind our smart virtual card with this certificate programmatically.

We run our Mac application. We open a document with a signature field on it in the Adobe Acrobat. When we click on the signature it only opens the certificate with its private key.

By process, as defined it should look system-wide to check any smart card. It would invoke our virtual smart card driver class via post in the Security/Tokens folder.


Problem: plist not going to call our VirtualSmartCardDriver class.

MacBook Pro 13″, macOS 14.5

Posted on Sep 11, 2024 2:16 AM

Reply

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Virtual smart card using CryptoTokenKit

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.