NB! This project is outdated and unmaintained, please refer to the OpenSC MacInstaller instead!
Mac OS X 10.4 has a native support for smart cards, called Tokend.
Native Mac applications (Safari browser, Mail client) will be able to automatically use the keys on the card that are supported by the Tokend.
There is an OpenSC tokend as part of OpenSC's sca package for Mac OS X. It uses the OpenSC library (the PKCS15 layer, not the pkcs11 lib) and should therefore support the same cards. It can be use together with other OpenSC lib/apps such as the pkcs11 lib for the Mozilla family of browsers and mail clients.
Currently supported are
For more info:
Limitations:
OpenSC.Tokend is installed by default by the last release of SCA. You don't need to build it as end user. This is for reference only (for developers and for curious...).
This is pretty complicated, most is based on the doc "Building Tokend Using the Darwin Build Scripts 1.1" that can be requested on the apple-cdsa mailing list. Here we will build the PPC and the i386 part on a PPC based Mac.
Make sure you have Mac OS X 10.4.6.
If you want SVN (subversion): download and install fink http://fink.sourceforge.net/ and use fink to obtain svn: "sudo fink install svn-client" in a Terminal window.
(This way your regular system won't be modified when all frameworks etc. are downloaded)
Note: next time you start your Mac, you need to re-open the builds.dmg disk image again before you can work with it: double-click on it in Finder or do "hdiutil attach Builds.dmg" in a Terminal window.
This is done in a subdirectory of /Volumes/Builds/. It's name depends on the 10.4.x version that you have. For example:
(See http://www.opensource.apple.com/darwinsource/ to find the build number (click on Source link, then on the TEXT link. The build number is in the first line. You also need to check http://darwinsource.opendarwin.org/plists/ to see if the most recent version is available for darwinbuild)
In what follows, we assume we are building for 10.4.5.
This opens vi or vim (yes:-) where you have to remove 'i386' from RC_ARCHS (use the arrow keys to go to 'i386', then hit x to delete it, then use the ESC button to go back to normal mode and type :wq or :wq!)
Remove now 'ppc' from RC_ARCHS
Fisrt, we build for PowerPC architecture.
This command will download the Tokend-25868 code and all required libs,frameworks,... and build the tokend's as Apple did. It will take a while.
Then, we build for i386 architecture.
This command will download the Tokend-26098 code and all required libs,frameworks,... and build the tokend's as Apple did. It will take a while.
Your Darwinbuild environment is ready now. You only need to perform theses steps once.
Download the installer from http://www.opensc-project.org/sca/, or look at this site for info on how to get the sources and build it yourself
After installation, everything should be in /Library/OpenSC/.
During the process to build OpenSC.Tokend, we need the OpenSC libraries.
This is part of sca source, just search for the opensc.tokend/ directory.
Everything is done through the Makefile.
The Universal OpenSC.tokend will be placed in compiled-opensc_tokend/System/Library/Security/tokend
FYI: The Tokend-xxxxx/ directory is based on the one from opendarwin:
sudo rm -rf /var/db/TokenCacheAnother option might be not to give the token a pre-calculated id (see #7)