I cleaned up my compile directions for pcsc-lite and ccid a little:

pcsc-lite-1.5.3:

./configure CCC=/opt/sunstudio12.1/bin/CC CC=/opt/sunstudio12.1/bin/cc 
--sysconfdir=/etc --prefix=/usr/local 
--enable-usbdropdir=/usr/sfw/lib/libusb_plugins/

make

pfexec make install

pfexec mkdir /usr/sfw/lib/libusb_plugins/

ccid-1.3.10:

env PCSC_CFLAGS=-I/usr/local/include/PCSC PCSC_LIBS="-L/usr/local/lib 
-lpcsclite" LIBUSB_CFLAGS=-I/usr/sfw/include LIBUSB_LIBS="-L/usr/sfw/lib -lusb" 
./configure CCC=/opt/sunstudio12.1/bin/CC CC=/opt/sunstudio12.1/bin/cc 
--sysconfdir=/etc --prefix=/usr/local 
--enable-usbdropdir=/usr/sfw/lib/libusb_plugins/

make

pfexec make install

Running the pcsc daemon in the foreground with my USB card reader plugged in 
reveals:

reinholz at etrenank:~$ pfexec /usr/local/sbin/pcscd -d -f
00000000 pcscdaemon.c:266:() pcscd set to foreground with debug send to stderr
00000302 pcscdaemon.c:505:() pcsc-lite 1.5.3 daemon ready.
00198528 hotplug_libhal.c:307:() Looking a driver for VID: 0x0430, PID: 0x00A2
00000757 hotplug_libhal.c:307:() Looking a driver for VID: 0x0566, PID: 0x4006
00000605 hotplug_libhal.c:307:() Looking a driver for VID: 0x0430, PID: 0x100E

Which seems to indicate that pcsc isn't communicating with libusb correctly if 
it's not finding a driver for my SCM SCR331 smart card reader.

I also tried opensc (available in the Contrib IPS repository) and openct (only 
available in the OldPending IPS repository). I had to manually compile opensc 
from source in order to get it to recognize openct (it probably wouldn't be a 
bad idea to manually compile openct as well), but openct is able to detect my 
smart card reader and communicate with it:

reinholz at etrenank:~$ openct-tool list
  0 CCID Compatible

reinholz at etrenank:~$ openct-tool atr
Detected CCID Compatible
Card present, status changed
ATR: 3b db 96 00 80 1f 03 00 31 c0 64 77 e3 03 00 82 90 00 c1

However, openct (and opensc when using openct to communicate with the card 
reader) cannot read the contents of my smart card, which is an older Oberthur 
Common Access Card (CAC).

reinholz at etrenank:~$ openct-tool read
Detected CCID Compatible
Card present, status changed
failed to read memory card: Operation not supported

I can manually compile opensc to use pcsc in addition to or instead of openct 
to communicate with my card reader, which is my goal so I can use opensc's 
PKCS#11 module instead of struggling with Red Hat's coolkey (which appears to 
no longer be developed). However, until I get pcsc to properly detect my card 
reader, I can't do that.

A very tempting alternative is to upgrade to one of the new PIV-compliant CACs 
that reportedly works smoothly with opensc and openct without the need to fuss 
with pcsc, coolkey, etc. 
http://lists.apple.com/archives/fed-talk/2009/Apr/msg00027.html
-- 
This message posted from opensolaris.org

Reply via email to