Common Requirements[edit]

For all of the different smart cards covered here you'll need to have a configured smart card reader supported by appropriate drivers. It's recommended to use CCID-compliant smart card readers whenever possible.

Install the software for accessing the smart card reader and smart card itself with:

? root
$ apt-get install pcscd pcsc-tools

The pcsc-tools package contains a number of useful utilities which can be used for communicating with the smart card and for setting it up.

To communicate with the smart-card, you also need the opensc package. You can install it with:

? root
$ apt-get install opensc

After you've installed the necessary packages, proceed to the chapter dealing with a particular type of smart card.

Rebuilding the OpenSC Package Using the Wheezy Sources[edit]

In case you end-up needing a more recent version of OpenSC than provided in stock Debian Squeeze, you may want to follow these instructions for building a more recent version of the package using the sources coming from the Debian Wheezy release.

Any computer with Debian Squeeze can be used to prepare a Debian package which should be installed on target machines. The build itself doesn't require any root access beyond the installation of build requisites.

Add the Wheezy sources into the repository configuration:

echo "deb-src wheezy main" >> /etc/apt/sources.list.d/wheezy_sources.list
echo "deb-src wheezy/updates main" >> /etc/apt/sources.list.d/wheezy_sources.list

Install the required dependencies with:

? root
$ apt-get build-dep opensc

Prepare the build directories, download the sources, and build the package:

mkdir ~/src/
cd ~/src/
apt-get source opensc
cd ~/src/opensc-0.12.2
dpkg-buildpackage -rfakeroot -b

You should now have the package built and ready in directory:

# ~/src/

This package should be copied over to destination machines and then installed with:

? root
$ dpkg -i {{package}}

Replace the parameter package with the resulting filename of the Debian package.