OpenSC + Estonian ID card not working, yet OpenCT sees the reader

View: New views
8 Messages — Rating Filter:   Alert me  

OpenSC + Estonian ID card not working, yet OpenCT sees the reader

by thbrockman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I recently installed Arch Linux and now attempted to add the Estonian
ID-card support. This hasn't gone as swimmingly as I'd planned, as
after installing the necessary packages and connecting the reader
opensc-tool says:

~# opensc-tool -l
Failed to establish context: No readers found

As I understand it, OpenSC is a higher-level library relying on OpenCT
for a unified interface to various card readers (correct me if I'm
wrong). Yet, OpenCT seems to be working:

/etc/opensc# /etc/rc.d/openct start
:: Starting Smart Card Terminal Framework    [BUSY]
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:0973/0001, egate)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:096e/0401, ePass3000)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:0529/050c, etoken)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:0529/0514, etoken)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:0529/0600, etoken64)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:0529/0700, etoken64)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:073d/0005, eutron)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:04b9/1202, ikey2k)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:04b9/1300, ikey3k)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:096e/0005, starkey)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:03f0/1024, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:046a/0010, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:04e6/5115, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:04e6/5116, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:04e6/5117, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:04e6/511d, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:04e6/E001, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:04e6/E003, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:073d/0c00, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:076b/1021, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:076b/3021, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:076b/5121, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:076b/5321, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:076b/6622, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:0783/0003, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:08e6/3437, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:08e6/3438, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:08e6/4433, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:0b97/7762, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:0b97/7772, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:0bf8/1006, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:0dc3/1004, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:0a89/0030, ccid)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:072f/0001, pertosmart1030)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:072f/8009, pertosmart1030)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:072f/9000, pertosmart1038)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:072f/9006, pertosmart1038)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:072f/9007, pertosmart1038)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:072f/90d0, pertosmart1038)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:0c4b/0100, cyberjack)
Debug: ifd_driver_add_id: ifd_driver_add_id(usb:0a89/0020, rutoken)
Debug: ifd_spawn_handler: driver=ccid,
devtype=usb:/dev/bus/usb/005/010, index=-1

As "debug" has been set high in openct.conf, there's lots of output in
daemons.log:

Oct 28 23:21:15 ifdhandler[7217]: ifd_open: trying to open
ccid@usb:/dev/bus/usb/005/010
Oct 28 23:21:15 ifdhandler[7217]: ifd_usb_control: usb req type=x80
req=x06 val=x0100 ind=x0000 len=18
Oct 28 23:21:15 ifdhandler[7217]: ifd_usb_control: recv  12 01 00 02
00 00 00 10 e6 04 16 51 21 05 01 02 05 01
Oct 28 23:21:15 ifdhandler[7217]: ifd_usb_control: usb req type=x80
req=x06 val=x0200 ind=x0000 len=8
Oct 28 23:21:15 ifdhandler[7217]: ifd_usb_control: recv  09 02 5d 00 01 01 03 a0
Oct 28 23:21:15 ifdhandler[7217]: ifd_usb_control: usb req type=x80
req=x06 val=x0200 ind=x0000 len=93
Oct 28 23:21:15 ifdhandler[7217]: ifd_usb_control: recv  09 02 5d 00
01 01 03 a0 32 09 04 00 00 03 0b 00 00 04 36 21 00 01 00 01 03 00 00
00 a0 0f 00 00 40 1f 00 00 00 01 2a 00 00 29 40 05 00 00 fc 00 00 00
00 00 00 00 00 00 00 00 ba 00 01 00 07 01 00 00 ff ff 00 00 00 01 07
05 01 02 40 00 00 07 05 82 02 40 00 00 07 05 83 03 10 00 10
Oct 28 23:21:15 ifdhandler[7217]: skipped 1 class/vendor specific
interface descriptors
Oct 28 23:21:15 ifdhandler[7217]: usb_set_params: called. config
xffffffff ifc x00 eps x01/x82
Oct 28 23:21:15 ifdhandler[7217]: ccid_open_usb: Accepted 04e6:5116
with features 0x100ba and protocols 0x3 events=1
Oct 28 23:21:15 ifdhandler[7217]: ccid_activate: called.
Oct 28 23:21:15 ifdhandler[7217]: ifdhandler_run: events inactive for
reader CCID Compatible
Oct 28 23:21:15 ifdhandler[7217]: ifd_usb_begin_capture: usb capture
type=1 ep=x83 maxpacket=8
Oct 28 23:21:15 ifdhandler[7217]: usb_submit_urb: submit urb 0x8965980
Oct 28 23:21:15 ifdhandler[7217]: ifd_usb_capture: called, timeout=100 ms.
Oct 28 23:21:15 ifdhandler[7217]: ifd_usb_capture: usb capture:
Command timed out
Oct 28 23:21:15 ifdhandler[7217]: ifd_usb_end_capture: called.
Oct 28 23:21:15 ifdhandler[7217]: ccid_command: sending: 65 00 00 00
00 00 00 00 00 00
Oct 28 23:21:15 ifdhandler[7217]: usb_send: usb send to=x01
Oct 28 23:21:15 ifdhandler[7217]: usb_send: send  65 00 00 00 00 00 00 00 00 00
Oct 28 23:21:15 ifdhandler[7217]: usb_recv: usb recv from=x82
Oct 28 23:21:15 ifdhandler[7217]: usb_recv: recv  81 00 00 00 00 00 00 02 00 01
Oct 28 23:21:15 ifdhandler[7217]: ccid_command: received: 81 00 00 00
00 00 00 02 00 01
Oct 28 23:21:15 ifdhandler[7217]: ccid_card_status: probed result: 2
Oct 28 23:21:16 ifdhandler[7217]: ifd_usb_begin_capture: usb capture
type=1 ep=x83 maxpacket=8
Oct 28 23:21:16 ifdhandler[7217]: usb_submit_urb: submit urb 0x8965980
Oct 28 23:21:16 ifdhandler[7217]: ifd_usb_capture: called, timeout=100 ms.
Oct 28 23:21:17 ifdhandler[7217]: ifd_usb_capture: usb capture:
Command timed out
Oct 28 23:21:17 ifdhandler[7217]: ifd_usb_end_capture: called.

Oct 28 23:21:17 ifdhandler[7217]: ccid_card_status: cached result: 0
Oct 28 23:21:17 ifdhandler[7217]: ifd_usb_begin_capture: usb capture
type=1 ep=x83 maxpacket=8
Oct 28 23:21:17 ifdhandler[7217]: usb_submit_urb: submit urb 0x8965980
Oct 28 23:21:17 ifdhandler[7217]: ifd_usb_capture: called, timeout=100 ms.
Oct 28 23:21:17 ifdhandler[7217]: ifd_usb_capture: usb capture:
Command timed out
Oct 28 23:21:17 ifdhandler[7217]: ifd_usb_end_capture: called.

The last chunk keeps on being appended to the log forever (looping).

lsusb output:

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 010: ID 04e6:5116 SCM Microsystems, Inc. SCR331-LC1
SmartCard Reader
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Testing with ifdhandler separately yields:

~# pkill ifdhandler
~# ifdhandler -FHddddddd ccid usb /dev/bus/usb/005/010
Debug: ifd_open: trying to open ccid@usb:/dev/bus/usb/005/010
Debug: ifd_usb_control: usb req type=x80 req=x06 val=x0100 ind=x0000 len=18
Debug: ifd_usb_control: recv  12 01 00 02 00 00 00 10 e6 04 16 51 21
05 01 02 05 01
Debug: ifd_usb_control: usb req type=x80 req=x06 val=x0200 ind=x0000 len=8
Debug: ifd_usb_control: recv  09 02 5d 00 01 01 03 a0
Debug: ifd_usb_control: usb req type=x80 req=x06 val=x0200 ind=x0000 len=93
Debug: ifd_usb_control: recv  09 02 5d 00 01 01 03 a0 32 09 04 00 00
03 0b 00 00 04 36 21 00 01 00 01 03 00 00 00 a0 0f 00 00 40 1f 00 00
00 01 2a 00 00 29 40 05 00 00 fc 00 00 00 00 00 00 00 00 00 00 00 ba
00 01 00 07 01 00 00 ff ff 00 00 00 01 07 05 01 02 40 00 00 07 05 82
02 40 00 00 07 05 83 03 10 00 10
Debug: skipped 1 class/vendor specific interface descriptors
Debug: usb_set_params: called. config xffffffff ifc x00 eps x01/x82
Debug: ccid_open_usb: Accepted 04e6:5116 with features 0x100ba and
protocols 0x3 events=1
Debug: ccid_activate: called.
Debug: ccid_get_eventfd: called.
Debug: ifdhandler_run: events active for reader CCID Compatible
Debug: ccid_before_command: called.
Debug: ifd_usb_begin_capture: usb capture type=1 ep=x83 maxpacket=8
Debug: usb_submit_urb: submit urb 0x9b4cac0
Debug: ifd_usb_capture: called, timeout=100 ms.
Debug: ifd_sysdep_usb_capture_event: usb reapurb: len=2
Debug: usb_submit_urb: submit urb 0x9b4cac0
Debug: ifd_usb_capture: usb capture: recv  50 02
Debug: ccid_card_status: status received: 50 02
Debug: ifd_usb_capture: called, timeout=100 ms.
Debug: ifd_usb_capture: usb capture: Command timed out
Debug: ifd_usb_end_capture: called.
Debug: ccid_card_status: polled result: 2
Debug: ccid_after_command: called.
Debug: ifd_usb_begin_capture: usb capture type=1 ep=x83 maxpacket=8
Debug: usb_submit_urb: submit urb 0x9b4cac0

# inserting card here

Debug: ccid_event: called.
Debug: ifd_usb_capture_event: called.
Debug: ifd_sysdep_usb_capture_event: usb reapurb: len=2
Debug: usb_submit_urb: submit urb 0x9b4cac0
Debug: ifd_usb_capture_event: usb event capture: recv  50 03
Debug: ccid_event: status received: 50 03
Debug: ccid_event: slot 0 event result: b76d9e93
Debug: ifd_slot_status_update: card status change slot 0: 0 -> 1

# removing card here

Debug: ccid_event: called.
Debug: ifd_usb_capture_event: called.
Debug: ifd_sysdep_usb_capture_event: usb reapurb: len=2
Debug: usb_submit_urb: submit urb 0x9b4cac0
Debug: ifd_usb_capture_event: usb event capture: recv  50 02
Debug: ccid_event: status received: 50 02
Debug: ccid_event: slot 0 event result: b76d9e92
Debug: ifd_slot_status_update: card status change slot 0: 1 -> 0

/var/run/openct/status contents:

~# cat /var/run/openct/status | strings
CCID Compatible

I'm using the recommended opensc.conf for the Estonian ID-card setup:

app default {
        debug = 100;
        debug_file = opensc-debug.log;
        error_file = opensc-errors.log;
       
        reader_drivers = pcsc, ctapi;

        reader_driver pcsc {
                apdu_masquerade = none;
                max_send_size = 252;
                max_recv_size = 252;
        }

        framework pkcs15 {
                use_caching = true;
                try_emulation_first = yes;
                builtin_emulators = esteid;
        }

        card_atr 3b:6e:00:ff:45:73:74:45:49:44:20:76:65:72:20:31:2e:30 {
                force_protocol = t0;
        }
       
        card_atr 3b:fe:94:00:ff:80:b1:fa:45:1f:03:45:73:74:45:49:44:20:76:65:72:20:31:2e:30:43
{
                force_protocol = t0;
        }
}

app opensc-pkcs11 {
        pkcs11 {
                num_slots = 2;
                hide_empty_tokens = true;
                lock_login = false;
                cache_pins = false;
                soft_keygen_allowed = false;
        }
}

app pkcs11-spy {
        spy {
                output = /tmp/pkcs11-spy.log;
                module = /usr/lib/pkcs11/opensc-pkcs11.so;
        }
}

Finally, the opensc debug and error logs generated upon running
opensc-tool. Debug log:

[opensc-tool] ctx.c:707:sc_context_create: ===================================
[opensc-tool] ctx.c:708:sc_context_create: opensc version: 0.11.4mp1
[opensc-tool] ctx.c:306:find_library: warning: relative path to driver
'pcsc' used
[opensc-tool] ctx.c:740:sc_release_context: called

Error log:

[opensc-tool] ctx.c:343:load_dynamic_driver: Module pcsc: cannot load
pcsc library: file not found
[opensc-tool] ctx.c:395:load_reader_drivers: Unable to load 'pcsc'.

But even when I only leave the ctapi driver, opensc-tool doesn't
become any friendlier. No errors are logged though.

So, to recap, OpenCT seems to detect my reader and testing with
ifdhandler shows activity on inserting and removing the card.
opensc-tool, though, is blissfully unaware of the reader.

Any help would be greatly appreciated.

Kind regards,
Thomas
_______________________________________________
opensc-user mailing list
opensc-user@...
http://www.opensc-project.org/mailman/listinfo/opensc-user

Re: OpenSC + Estonian ID card not working, yet OpenCT sees the reader

by Martin Paljak-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.
On 28.10.2009, at 23:35, Thomas Brockman wrote:
> opensc-tool says:
>
> ~# opensc-tool -l
> Failed to establish context: No readers found
>
> As I understand it, OpenSC is a higher-level library relying on OpenCT
> for a unified interface to various card readers (correct me if I'm
> wrong). Yet, OpenCT seems to be working:
Yes, if you decide to use it.

...
>
> CCID Compatible
Your reader is CCID compatible. The standard interface (and  
recommended methid) for accessing smart cards in CCID compatible  
readers is pcsc-lite and CCID driver, found from pcsclite.alioth.debian.org
.


> I'm using the recommended opensc.conf for the Estonian ID-card setup:
>
> app default {
> debug = 100;
Where did you find such recommendation?


> debug_file = opensc-debug.log;
> error_file = opensc-errors.log;
>
> reader_drivers = pcsc, ctapi;

OpenCT driver is not enabled.

>
> Any help would be greatly appreciated.
Install pcsc-lite, ccid, opensc in this order and make them use each  
other. You do not have to change anything in the example configuration  
file except "lock_login" (which was re-enabled some time ago for some  
reason)


--
Martin Paljak
http://martin.paljak.pri.ee
+372.515.6495




_______________________________________________
opensc-user mailing list
opensc-user@...
http://www.opensc-project.org/mailman/listinfo/opensc-user

Re: OpenSC + Estonian ID card not working, yet OpenCT sees the reader

by thbrockman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

> Your reader is CCID compatible. The standard interface (and recommended
> methid) for accessing smart cards in CCID compatible readers is pcsc-lite
> and CCID driver, found from pcsclite.alioth.debian.org.

Right. pcsc-lite is installed, so I start pcscd instead of
OpenCT/ifdhandler (as I understand it, they're mutually incompatible):

/etc/opensc# /etc/rc.d/pcscd start
:: Starting Middleware to access a smart card using the SCard API [DONE]

The LED on my reader lights up, so some low level must be functional.
daemon.log displays no errors. Yet, OpenSC doesn't seem to budge.
Which driver should I use? Trying

reader_drivers = ccid;

yields

[opensc-tool] ctx.c:395:load_reader_drivers: Unable to load 'ccid'.

reader_drivers = pcsc;

gives

[opensc-tool] ctx.c:343:load_dynamic_driver: Module pcsc: cannot load
pcsc library: file not found
[opensc-tool] ctx.c:395:load_reader_drivers: Unable to load 'pcsc'.

ccid is installed and the driver is present in /usr/lib:

/etc/opensc# locate ccid | fgrep /usr/lib
/usr/lib/pcsc/drivers/ifd-ccid.bundle
/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents
/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux
/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so.1.3.11
/usr/lib/pcsc/drivers/serial/libccidtwin.so
/usr/lib/pcsc/drivers/serial/libccidtwin.so.1.3.11

Looks like OpenSC is able to locate it, but can't load it for some reason?

>> I'm using the recommended opensc.conf for the Estonian ID-card setup:
>>
>> app default {
>>        debug = 100;
>
> Where did you find such recommendation?

I changed the debug value, it was set to zero originally. Otherwise,
it's the opensc.conf straight from ideelabor.ee SVN, arch has a
separate package for it in AUR (opensc-estonia-svn):
http://aur.archlinux.org/packages.php?ID=11881

> OpenCT driver is not enabled.

How should I do that? I.e. what should be the reader_drivers value?
Does using the OpenCT driver mean that I should stop pcscd and start
up openct instead?

> Install pcsc-lite, ccid, opensc in this order and make them use each other.

All done, the "make them use each other" is the hard part, it seems.

Kind regards,
Thomas



2009/10/29 Martin Paljak <martin@...>:

> Hi.
> On 28.10.2009, at 23:35, Thomas Brockman wrote:
>>
>> opensc-tool says:
>>
>> ~# opensc-tool -l
>> Failed to establish context: No readers found
>>
>> As I understand it, OpenSC is a higher-level library relying on OpenCT
>> for a unified interface to various card readers (correct me if I'm
>> wrong). Yet, OpenCT seems to be working:
>
> Yes, if you decide to use it.
>
> ...
>>
>> CCID Compatible
>
> Your reader is CCID compatible. The standard interface (and recommended
> methid) for accessing smart cards in CCID compatible readers is pcsc-lite
> and CCID driver, found from pcsclite.alioth.debian.org.
>
>
>> I'm using the recommended opensc.conf for the Estonian ID-card setup:
>>
>> app default {
>>        debug = 100;
>
> Where did you find such recommendation?
>
>
>>        debug_file = opensc-debug.log;
>>        error_file = opensc-errors.log;
>>
>>        reader_drivers = pcsc, ctapi;
>
> OpenCT driver is not enabled.
>
>>
>> Any help would be greatly appreciated.
>
> Install pcsc-lite, ccid, opensc in this order and make them use each other.
> You do not have to change anything in the example configuration file except
> "lock_login" (which was re-enabled some time ago for some reason)
>
>
> --
> Martin Paljak
> http://martin.paljak.pri.ee
> +372.515.6495
>
>
>
>
>
_______________________________________________
opensc-user mailing list
opensc-user@...
http://www.opensc-project.org/mailman/listinfo/opensc-user

Re: OpenSC + Estonian ID card not working, yet OpenCT sees the reader

by Kevin Oberman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Date: Thu, 29 Oct 2009 15:17:21 +0200
> From: Thomas Brockman <thbrockman@...>
> Sender: opensc-user-bounces@...
>
> Hello,
>
> > Your reader is CCID compatible. The standard interface (and recommended
> > methid) for accessing smart cards in CCID compatible readers is pcsc-lite
> > and CCID driver, found from pcsclite.alioth.debian.org.
>
> Right. pcsc-lite is installed, so I start pcscd instead of
> OpenCT/ifdhandler (as I understand it, they're mutually incompatible):
>
> /etc/opensc# /etc/rc.d/pcscd start
> :: Starting Middleware to access a smart card using the SCard API [DONE]

What OS are you running? This looks like it might be FreeBSD.  According
to the documentation on pcsc-lite ccid driver, it did not work on
FreeBSD.

FreeBSD V6 and V7 have a pretty poor USB stack and lots of things don't
work right. The USB code was totally replaced in V8.0 which is due to be
released in the next few weeks, and this might make it work. 8.0RC2 is
now available, but I don't have a CCID card to test with at this time.

If you are running Linux, never mind.
--
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman@... Phone: +1 510 486-8634
Key fingerprint:059B 2DDF 031C 9BA3 14A4  EADA 927D EBB3 987B 3751
_______________________________________________
opensc-user mailing list
opensc-user@...
http://www.opensc-project.org/mailman/listinfo/opensc-user

Re: OpenSC + Estonian ID card not working, yet OpenCT sees the reader

by Andreas Jellinghaus-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

my suggestion:
1.) remove openct from your system.
2.) "reader_driver" selects the middleware to talk to. set it to "pcsc";
3.) install pcsc-lite and libccid
4.) "opensc-tool -r"  will show the ccid reader (via pcsc-lite and ccid).
5.) if opensc can't find the pcsc library, check the filename and fix it.
        "/usr/lib/libpcsclite.so" or with an extra ".1" at the end, or the
    same name in /usr/local/lib or something like that.

if there still is a problem: I'm no expert on pcsc-lite, but you can ask
on this list for help, I'm sure someone can help.

Regards, Andreas
_______________________________________________
opensc-user mailing list
opensc-user@...
http://www.opensc-project.org/mailman/listinfo/opensc-user

Re: OpenSC + Estonian ID card not working, yet OpenCT sees the reader

by thbrockman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

2009/10/29 Kevin Oberman <oberman@...>:
> What OS are you running? This looks like it might be FreeBSD.  According
> to the documentation on pcsc-lite ccid driver, it did not work on
> FreeBSD.

Arch Linux.

2009/10/29 Andreas Jellinghaus <aj@...>:

> my suggestion:
> 1.) remove openct from your system.
> 2.) "reader_driver" selects the middleware to talk to. set it to "pcsc";
> 3.) install pcsc-lite and libccid
> 4.) "opensc-tool -r"  will show the ccid reader (via pcsc-lite and ccid).
> 5.) if opensc can't find the pcsc library, check the filename and fix it.
>        "/usr/lib/libpcsclite.so" or with an extra ".1" at the end, or the
>    same name in /usr/local/lib or something like that.
>
> if there still is a problem: I'm no expert on pcsc-lite, but you can ask
> on this list for help, I'm sure someone can help.
>
> Regards, Andreas
>

So OpenCT is not needed at all, am I right? Anyway, pcsc-lite and ccid
have been installed, and the pcsc daemon is running. opensc cannot
find the pcsc driver, as I've mentioned:

/etc/opensc# cat opensc-debug.log
[opensc-tool] ctx.c:707:sc_context_create: ===================================
[opensc-tool] ctx.c:708:sc_context_create: opensc version: 0.11.4mp1
[opensc-tool] ctx.c:306:find_library: warning: relative path to driver
'pcsc' used
[opensc-tool] ctx.c:740:sc_release_context: called
/etc/opensc# cat opensc-errors.log
[opensc-tool] ctx.c:343:load_dynamic_driver: Module pcsc: cannot load
pcsc library: file not found
[opensc-tool] ctx.c:395:load_reader_drivers: Unable to load 'pcsc'

> 5.) if opensc can't find the pcsc library, check the filename and fix it.
>        "/usr/lib/libpcsclite.so" or with an extra ".1" at the end, or the
>    same name in /usr/local/lib or something like that.

I'd appreciate if you'd elaborate on that a bit.

Thomas
_______________________________________________
opensc-user mailing list
opensc-user@...
http://www.opensc-project.org/mailman/listinfo/opensc-user

Re: OpenSC + Estonian ID card not working, yet OpenCT sees the reader

by thbrockman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello again,

I finally managed to get OpenSC to detect my card and reader perfectly.

I uninstalled the custom ideelabor.ee SVN fork of OpenSC and installed
the vanilla OpenSC. Possibly the issue was just that I had installed
OpenSC before pcsc and ccid so it wasn't configured to use them,
possibly the custom fork is broken. Anyway, it works now. Thanks to
all for help.

Kind regards,
Thomas



2009/10/29 thbrockman <thbrockman@...>:

> Hi,
>
> 2009/10/29 Kevin Oberman <oberman@...>:
>> What OS are you running? This looks like it might be FreeBSD.  According
>> to the documentation on pcsc-lite ccid driver, it did not work on
>> FreeBSD.
>
> Arch Linux.
>
> 2009/10/29 Andreas Jellinghaus <aj@...>:
>> my suggestion:
>> 1.) remove openct from your system.
>> 2.) "reader_driver" selects the middleware to talk to. set it to "pcsc";
>> 3.) install pcsc-lite and libccid
>> 4.) "opensc-tool -r"  will show the ccid reader (via pcsc-lite and ccid).
>> 5.) if opensc can't find the pcsc library, check the filename and fix it.
>>        "/usr/lib/libpcsclite.so" or with an extra ".1" at the end, or the
>>    same name in /usr/local/lib or something like that.
>>
>> if there still is a problem: I'm no expert on pcsc-lite, but you can ask
>> on this list for help, I'm sure someone can help.
>>
>> Regards, Andreas
>>
>
> So OpenCT is not needed at all, am I right? Anyway, pcsc-lite and ccid
> have been installed, and the pcsc daemon is running. opensc cannot
> find the pcsc driver, as I've mentioned:
>
> /etc/opensc# cat opensc-debug.log
> [opensc-tool] ctx.c:707:sc_context_create: ===================================
> [opensc-tool] ctx.c:708:sc_context_create: opensc version: 0.11.4mp1
> [opensc-tool] ctx.c:306:find_library: warning: relative path to driver
> 'pcsc' used
> [opensc-tool] ctx.c:740:sc_release_context: called
> /etc/opensc# cat opensc-errors.log
> [opensc-tool] ctx.c:343:load_dynamic_driver: Module pcsc: cannot load
> pcsc library: file not found
> [opensc-tool] ctx.c:395:load_reader_drivers: Unable to load 'pcsc'
>
>> 5.) if opensc can't find the pcsc library, check the filename and fix it.
>>        "/usr/lib/libpcsclite.so" or with an extra ".1" at the end, or the
>>    same name in /usr/local/lib or something like that.
>
> I'd appreciate if you'd elaborate on that a bit.
>
> Thomas
>
_______________________________________________
opensc-user mailing list
opensc-user@...
http://www.opensc-project.org/mailman/listinfo/opensc-user

Re: OpenSC + Estonian ID card not working, yet OpenCT sees the reader

by Andreas Jellinghaus-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Donnerstag 29 Oktober 2009 18:18:06 schrieb thbrockman:
> > 5.) if opensc can't find the pcsc library, check the filename and fix it.
> >        "/usr/lib/libpcsclite.so" or with an extra ".1" at the end, or the
> >    same name in /usr/local/lib or something like that.
>
> I'd appreciate if you'd elaborate on that a bit.

latest opensc contains in opensc.conf
                # Use specific pcsc provider.
                # Default: /usr/lib/libpcsclite.so.1
                # provider_library = /usr/lib/libpcsclite.so.1

i.e. the library isn't loaded via the normal linker with LD_LIBRARY_PATH
searching, but as a plugin, and opensc needs to know the exact path.

Regards, Andreas
_______________________________________________
opensc-user mailing list
opensc-user@...
http://www.opensc-project.org/mailman/listinfo/opensc-user