Smartcards
This page explains how to setup your system in order to use a smart card reader.
Installation
If the card reader does not have a PIN pad, append the line(s) and set enable_pinpad = false
in the opensc configuration file /etc/opensc.conf
.
Scan for card reader
Install and start the pcsc_scan utility, then connect the Smart card reader and finally insert a card. If you see output like this, the smart card reader and also the card have been successfully recognized.
Configuration
Mozilla Firefox
The browser needs to set the new security-related device. Open the Security Devices page (reach it via Preferences > Privacy & Security > Certificates), then click Load and set the Module Name to CAC Module and module filename to .
Chromium
Chromium uses NSS. Open a shell in your home directory and verify that the CAC Module is not already present:
If not, close any browser and add the module (an user interaction for confirmation is required):
Check for the correct execution of the command:
Tips and tricks
Smargo/TV Card reader
When interfacing with a TV-card for live TV and recording (PVR/DVR), you may need to assign the smartcard reader to the user group allowing decryption. When using a Smargo Smartreader consider the following udev rule:
Set as the reader device when using softcam applications like OSCam.
p11tool
If using packages from the GnuTLS suite which utilize p11-kit, such as p11tool, the the OpenSC driver might not properly load. This can be determined if you run and you do not see your hardware token in the list.
Install the package in order to enable loading of the OpenSC module.
Alternatively, it is possible to manually create a file that allows the OpenSC driver to be properly loaded:
/usr/share/p11-kit/modules/opensc.module
module: opensc-pkcs11.so
Troubleshooting
Firefox can't access data
If the browser is not able to use the smart card data, probably it is not aware of the service which provides access to the device. This happens if you plug in the smart card reader after you open Firefox. To solve this issue, simply restart Firefox.
LIBUSB_ERROR_BUSY
PC/SC can conflict with GnuPG for access to smartcards. See Ludovic Rousseau's blog and GnuPG#GnuPG with pcscd (PCSC Lite).