OpenCT
Not to be confused with OpenCL.
CTAPI is Article description::a German standard for PC to smartcard reader communication, which is implemented by OpenCT. The international standard is in contrast PC/SC.
Installation
Kernel
You have to enable kernel support depending on how your cardreader is connected:
USE flags
Portage knows the global openct USE flag for enabling support for OpenCT in other packages. Enabling this USE flag will pull in dev-libs/openct automatically:
/etc/portage/make.confUSE="openct"
Other USE flags of openct include:
USE flags for dev-libs/openct library for accessing smart card terminals
debug
|
Add debug output to the driver library for pcsc-lite. |
doc
|
Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally |
pcsc-lite
|
Build a driver library for sys-apps/pcsc-lite, providing PC/SC API access to devices supported by OpenCT. |
usb
|
Add USB support to applications that have optional USB support (e.g. cups) |
Emerge
After setting this you want to update your system so the changes take effect:
root #emerge --ask --changed-use --deep @worldConfiguration
Permissions
Add your user to the openct group to be able to access the cardreader:
root #gpasswd -a larry openctServices
OpenRC
To tart OpenCT:
root #/etc/init.d/openct startTo start OpenCT at boot time, add it the default runlevel:
root #rc-update add openct defaultThe OpenCT daemon blocks all detected cardreaders for every other software. An exception is, if you use the ifdhandler for PCSC-Lite.
Usage
Listing readers
List all detected cardreaders:
user $openct-tool listIf there is a detected cardreader, insert a smartcard. Test the access by checking the ATR:
user $openct-tool atrDetected CCID Compatible Card present, status changed ATR: 3B 75 94 00 00 62 02 02 03 01