Smartcard-HSM on Linux not found

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Smartcard-HSM on Linux not found

lists

My Smartcard-HSM (USB form) is recognised by the OS but not by opensc.

Linux version 3.7.10-1.16-desktop (geeko@buildhost) (gcc version 4.7.2 20130108 [gcc-4_7-branch revision 195012] (SUSE Linux) ) #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba)

  │ ├┬─SCx35xx v2.0 USB SC Reader                                                               │
  │ │├──Bus: USB                                                                                │
  │ │├──Class (spec):                                                                           │
  │ │├──Class: Chipcard reader                                                                  │
  │ │├──Device Identifier: 218128                                                               │
  │ │├──Device: SCx35xx v2.0 USB SC Reader                                                      │
  │ │├──Hwcfg Bus: usb                                                                          │
  │ │├──Model: SCM Microsystems SCx35xx v2.0 USB SC Reader                                      │
  │ │├──Old Unique Key: NLLf.qkb4Y46c0A0                                                        ┬
  │ │├──Parent Unique ID: zPk0.AJzOe6ShP50                                                      │
  │ │├+─Resources                                                                               │
  │ │├──Revision: 3.04                                                                          │
  │ │├──Sysfs ID: /devices/pci0000:00/0000:00:13.2/usb4/4-1/4-1:1.0                             │
  │ │├──Sysfs ID: 4-1:1.0                                                                       │
  │ │├──Unique Key: PYMB.hPVszvRlKk4                                                            ┴
  │ │├──Vendor Identifier: 197862                                                               │
  │ │├──Vendor: SCM Microsystems, Inc.                                                          │
  │ │├──hotplug: usb                                                                            │
  │ │└──modalias: usb:v04E6p5410d0304dc00dsc00dp00ic0Bisc00ip00in00


Because it's USB I've compiled with openct (I also tried pcsc-lite).

$ opensc-tool -i
opensc 0.13.0 [gcc  4.7.2 20130108 [gcc-4_7-branch revision 195012]]
Enabled features: zlib openssl openct

$ opensc-tool --list-readers  -vv
# Detected readers (openct)
Nr.  Card  Features  Name
0x7f11036bc700 22:52:36.160 [opensc-tool] reader-openct.c:173:openct_reader_detect_card_presence: called
0    No              OpenCT reader (detached)
0x7f11036bc700 22:52:36.161 [opensc-tool] reader-openct.c:173:openct_reader_detect_card_presence: called
1    No              OpenCT reader (detached)
0x7f11036bc700 22:52:36.161 [opensc-tool] ctx.c:787:sc_release_context: called
0x7f11036bc700 22:52:36.161 [opensc-tool] reader-openct.c:153:openct_reader_release: called
0x7f11036bc700 22:52:36.161 [opensc-tool] reader-openct.c:153:openct_reader_release: called
0x7f11036bc700 22:52:36.161 [opensc-tool] reader-openct.c:140:openct_reader_finish: called


$ pkcs11-tool --module /usr/local/lib/opensc-pkcs11.so  -L
Available slots:
Slot 0 (0xffffffffffffffff): Virtual hotplug slot
  (empty)
Slot 1 (0x1): OpenCT reader (detached)
  (empty)
Slot 2 (0x5): OpenCT reader (detached)
  (empty)

$ pkcs11-tool --module /usr/local/lib/opensc-pkcs11.so  -T
Available slots:
No slots.


What else should I look into?   Is there a more suitable forum than this?

Thanks.

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Smartcard-HSM on Linux not found

Anthony Foiani
Hello Lists!

(Hint, it's easier to write a human response if you offer at least a
first name...)

Anyway.

I'm using the SC-HSM under linux successfully (and, with just opensc /
pcsclite, under windows 7).

You shouldn't need openct; the SC-HSM reader is CCID compilant, so
pcsclite (pcscd) should work just fine.

I did rebuilt it myself, but that was due to the changes merged into
opensc after my distribution (Fedora 18) built their copy.

Using the attached script to rebuild my stack, here's the results:

$ opensc-tool -i
opensc 0.13.0 [gcc  4.7.2 20121109 (Red Hat 4.7.2-8)]
Enabled features: zlib openssl pcsc(libpcsclite.so.1)

$ opensc-tool --list-readers -v
# Detected readers (pcsc)
Nr.  Card  Features  Name
0    Yes             SCM Microsystems Inc. SCR 355 00 00
     3b:fe:18:00:00:81:31:fe:45:80:31:81:54:48:53:4d:31:73:80:21:40:81:07:fa
SmartCard-HSM

$ pkcs15-tool -D
Using reader with a card: SCM Microsystems Inc. SCR 355 00 00
PKCS#15 Card [SmartCard-HSM]:
    Version        : 0
    Serial number  : UTTM000xxxx
    Manufacturer ID: www.CardContact.de
    Flags          :
...

So try it again with pcsclite / libccid instead of openct.

Best regards,
Anthony Foiani

On Thu, Aug 29, 2013 at 3:57 PM,  <[hidden email]> wrote:

>
> My Smartcard-HSM (USB form) is recognised by the OS but not by opensc.
>
> Linux version 3.7.10-1.16-desktop (geeko@buildhost) (gcc version 4.7.2 20130108 [gcc-4_7-branch revision 195012] (SUSE Linux) ) #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba)
>
>   │ ├┬─SCx35xx v2.0 USB SC Reader                                                               │
>   │ │├──Bus: USB                                                                                │
>   │ │├──Class (spec):                                                                           │
>   │ │├──Class: Chipcard reader                                                                  │
>   │ │├──Device Identifier: 218128                                                               │
>   │ │├──Device: SCx35xx v2.0 USB SC Reader                                                      │
>   │ │├──Hwcfg Bus: usb                                                                          │
>   │ │├──Model: SCM Microsystems SCx35xx v2.0 USB SC Reader                                      │
>   │ │├──Old Unique Key: NLLf.qkb4Y46c0A0                                                        ┬
>   │ │├──Parent Unique ID: zPk0.AJzOe6ShP50                                                      │
>   │ │├+─Resources                                                                               │
>   │ │├──Revision: 3.04                                                                          │
>   │ │├──Sysfs ID: /devices/pci0000:00/0000:00:13.2/usb4/4-1/4-1:1.0                             │
>   │ │├──Sysfs ID: 4-1:1.0                                                                       │
>   │ │├──Unique Key: PYMB.hPVszvRlKk4                                                            ┴
>   │ │├──Vendor Identifier: 197862                                                               │
>   │ │├──Vendor: SCM Microsystems, Inc.                                                          │
>   │ │├──hotplug: usb                                                                            │
>   │ │└──modalias: usb:v04E6p5410d0304dc00dsc00dp00ic0Bisc00ip00in00
>
>
> Because it's USB I've compiled with openct (I also tried pcsc-lite).
>
> $ opensc-tool -i
> opensc 0.13.0 [gcc  4.7.2 20130108 [gcc-4_7-branch revision 195012]]
> Enabled features: zlib openssl openct
>
> $ opensc-tool --list-readers  -vv
> # Detected readers (openct)
> Nr.  Card  Features  Name
> 0x7f11036bc700 22:52:36.160 [opensc-tool] reader-openct.c:173:openct_reader_detect_card_presence: called
> 0    No              OpenCT reader (detached)
> 0x7f11036bc700 22:52:36.161 [opensc-tool] reader-openct.c:173:openct_reader_detect_card_presence: called
> 1    No              OpenCT reader (detached)
> 0x7f11036bc700 22:52:36.161 [opensc-tool] ctx.c:787:sc_release_context: called
> 0x7f11036bc700 22:52:36.161 [opensc-tool] reader-openct.c:153:openct_reader_release: called
> 0x7f11036bc700 22:52:36.161 [opensc-tool] reader-openct.c:153:openct_reader_release: called
> 0x7f11036bc700 22:52:36.161 [opensc-tool] reader-openct.c:140:openct_reader_finish: called
>
>
> $ pkcs11-tool --module /usr/local/lib/opensc-pkcs11.so  -L
> Available slots:
> Slot 0 (0xffffffffffffffff): Virtual hotplug slot
>   (empty)
> Slot 1 (0x1): OpenCT reader (detached)
>   (empty)
> Slot 2 (0x5): OpenCT reader (detached)
>   (empty)
>
> $ pkcs11-tool --module /usr/local/lib/opensc-pkcs11.so  -T
> Available slots:
> No slots.
>
>
> What else should I look into?   Is there a more suitable forum than this?
>
> Thanks.
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Opensc-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/opensc-devel

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel

build-opt-crypto.sh (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Smartcard-HSM on Linux not found

lists
Anthony Foiani wrote a helpful mail complete with build script.

> I'm using the SC-HSM under linux successfully (and, with just opensc /
> pcsclite, under windows 7).
>
> You shouldn't need openct; the SC-HSM reader is CCID compilant, so
> pcsclite (pcscd) should work just fine.
>
> I did rebuilt it myself, but that was due to the changes merged into
> opensc after my distribution (Fedora 18) built their copy.
>
> Using the attached script to rebuild my stack, here's the results:
>
> $ opensc-tool -i
> opensc 0.13.0 [gcc  4.7.2 20121109 (Red Hat 4.7.2-8)]
> Enabled features: zlib openssl pcsc(libpcsclite.so.1)
>
> $ opensc-tool --list-readers -v
> # Detected readers (pcsc)
> Nr.  Card  Features  Name
> 0    Yes             SCM Microsystems Inc. SCR 355 00 00
>      3b:fe:18:00:00:81:31:fe:45:80:31:81:54:48:53:4d:31:73:80:21:40:81:07:f=
> a
> SmartCard-HSM
>
> $ pkcs15-tool -D
> Using reader with a card: SCM Microsystems Inc. SCR 355 00 00
> PKCS#15 Card [SmartCard-HSM]:
>     Version        : 0
>     Serial number  : UTTM000xxxx
>     Manufacturer ID: www.CardContact.de
>     Flags          :
> ...
>
> So try it again with pcsclite / libccid instead of openct.

I've tried this on Fedora 19 but still no recognition.

$ opensc-tool -i
opensc 0.13.0 [gcc  4.8.1 20130603 (Red Hat 4.8.1-1)]
Enabled features: zlib openssl pcsc(libpcsclite.so.1)

$ opensc-tool --list-readers -v
No smart card readers found.

$ pkcs15-tool -D
No smart card readers found.

$ ldd /opt/crypto/bin/opensc-tool
        linux-vdso.so.1 =>  (0x00007fff933fe000)
        libopensc.so.3 => /opt/crypto/lib/libopensc.so.3 (0x00007f53b381e000)
        libcrypto.so.1.0.0 => /opt/crypto/lib/libcrypto.so.1.0.0 (0x00007f53b3404000)
        libz.so.1 => /lib64/libz.so.1 (0x0000003bcd000000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003bcc800000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003bccc00000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003bcc400000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003bcc000000)

$ ldd /opt/crypto/bin/pkcs15-tool
        linux-vdso.so.1 =>  (0x00007fffad937000)
        libopensc.so.3 => /opt/crypto/lib/libopensc.so.3 (0x00007f2cc4824000)
        libcrypto.so.1.0.0 => /opt/crypto/lib/libcrypto.so.1.0.0 (0x00007f2cc440a000)
        libz.so.1 => /lib64/libz.so.1 (0x0000003bcd000000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003bcc800000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003bccc00000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003bcc400000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003bcc000000)

-rw-r--r--.     475901 Sep 27 21:50 ccid-1.4.11.tar.bz2
-rw-r--r--.      59002 Sep 27 23:46 cryptodev-linux-1.6.tar.gz
-rw-rw-r--.      18721 Sep 28 00:57 engine_pkcs11-doug.tar.bz2
-rw-r--r--.      18768 Sep 27 21:50 HandlerTest-0.3.1.tar.gz
-rw-r--r--.     473756 Sep 27 21:50 libmusclecard-1.3.6.tar.bz2
-rw-rw-r--.     637140 Sep 28 21:12 libp11-doug.tar.gz
-rw-r--r--.     488428 Sep 27 21:50 libusbx-1.0.16.tar.bz2
-rw-r--r--.     270949 Sep 27 23:46 ncr-0.2.tar.gz
-rw-r--r--.     300609 Sep 27 21:50 openct-master.zip
-rw-r--r--.    2008663 Sep 27 21:50 opensc-0.13.0g20130827105820.tar.gz
-rw-r--r--.    1946899 Sep 27 21:50 opensc-0.13.0.tar.gz
-rw-rw-r--.    2027349 Sep 28 21:12 opensc-doug.tar.gz
-rw-r--r--.    4459777 Sep 27 23:46 openssl-1.0.1e.tar.gz
-rw-r--r--.     551751 Sep 27 21:50 pcsc-lite-1.8.8.tar.bz2
-rw-r--r--.     755165 Sep 28 01:08 xca-0.9.3.tar.gz

I used the 3 files forked by Doug
    engine_pkcs11-doug.tar.bz2
    libp11-doug.tar.gz
    opensc-doug.tar.gz
from https://github.com/dengert/ .

Also I notice openssl is slower with cryptodev than without.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Smartcard-HSM on Linux not found

Andreas Schwier (ML)
Can you check if the pcsc daemon is running ?

Can you also try opensc-tool -i -vvv to see what's going wrong ?

The SmartCard-HSM USB-stick has a build-in CCID card reader that should
be recognized by the pcscd as SCM card reader. There is no driver
installation required on Windows/Linux/MacOS.

Also try to run pcscd in foreground mode with

pcscd -a -d -f


Andreas

On 10/10/2013 01:02 PM, [hidden email] wrote:

> Anthony Foiani wrote a helpful mail complete with build script.
>
>> I'm using the SC-HSM under linux successfully (and, with just opensc /
>> pcsclite, under windows 7).
>>
>> You shouldn't need openct; the SC-HSM reader is CCID compilant, so
>> pcsclite (pcscd) should work just fine.
>>
>> I did rebuilt it myself, but that was due to the changes merged into
>> opensc after my distribution (Fedora 18) built their copy.
>>
>> Using the attached script to rebuild my stack, here's the results:
>>
>> $ opensc-tool -i
>> opensc 0.13.0 [gcc  4.7.2 20121109 (Red Hat 4.7.2-8)]
>> Enabled features: zlib openssl pcsc(libpcsclite.so.1)
>>
>> $ opensc-tool --list-readers -v
>> # Detected readers (pcsc)
>> Nr.  Card  Features  Name
>> 0    Yes             SCM Microsystems Inc. SCR 355 00 00
>>      3b:fe:18:00:00:81:31:fe:45:80:31:81:54:48:53:4d:31:73:80:21:40:81:07:f=
>> a
>> SmartCard-HSM
>>
>> $ pkcs15-tool -D
>> Using reader with a card: SCM Microsystems Inc. SCR 355 00 00
>> PKCS#15 Card [SmartCard-HSM]:
>>     Version        : 0
>>     Serial number  : UTTM000xxxx
>>     Manufacturer ID: www.CardContact.de
>>     Flags          :
>> ...
>>
>> So try it again with pcsclite / libccid instead of openct.
>
> I've tried this on Fedora 19 but still no recognition.
>
> $ opensc-tool -i
> opensc 0.13.0 [gcc  4.8.1 20130603 (Red Hat 4.8.1-1)]
> Enabled features: zlib openssl pcsc(libpcsclite.so.1)
>
> $ opensc-tool --list-readers -v
> No smart card readers found.
>
> $ pkcs15-tool -D
> No smart card readers found.
>
> $ ldd /opt/crypto/bin/opensc-tool
>         linux-vdso.so.1 =>  (0x00007fff933fe000)
>         libopensc.so.3 => /opt/crypto/lib/libopensc.so.3 (0x00007f53b381e000)
>         libcrypto.so.1.0.0 => /opt/crypto/lib/libcrypto.so.1.0.0 (0x00007f53b3404000)
>         libz.so.1 => /lib64/libz.so.1 (0x0000003bcd000000)
>         libdl.so.2 => /lib64/libdl.so.2 (0x0000003bcc800000)
>         libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003bccc00000)
>         libc.so.6 => /lib64/libc.so.6 (0x0000003bcc400000)
>         /lib64/ld-linux-x86-64.so.2 (0x0000003bcc000000)
>
> $ ldd /opt/crypto/bin/pkcs15-tool
>         linux-vdso.so.1 =>  (0x00007fffad937000)
>         libopensc.so.3 => /opt/crypto/lib/libopensc.so.3 (0x00007f2cc4824000)
>         libcrypto.so.1.0.0 => /opt/crypto/lib/libcrypto.so.1.0.0 (0x00007f2cc440a000)
>         libz.so.1 => /lib64/libz.so.1 (0x0000003bcd000000)
>         libdl.so.2 => /lib64/libdl.so.2 (0x0000003bcc800000)
>         libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003bccc00000)
>         libc.so.6 => /lib64/libc.so.6 (0x0000003bcc400000)
>         /lib64/ld-linux-x86-64.so.2 (0x0000003bcc000000)
>
> -rw-r--r--.     475901 Sep 27 21:50 ccid-1.4.11.tar.bz2
> -rw-r--r--.      59002 Sep 27 23:46 cryptodev-linux-1.6.tar.gz
> -rw-rw-r--.      18721 Sep 28 00:57 engine_pkcs11-doug.tar.bz2
> -rw-r--r--.      18768 Sep 27 21:50 HandlerTest-0.3.1.tar.gz
> -rw-r--r--.     473756 Sep 27 21:50 libmusclecard-1.3.6.tar.bz2
> -rw-rw-r--.     637140 Sep 28 21:12 libp11-doug.tar.gz
> -rw-r--r--.     488428 Sep 27 21:50 libusbx-1.0.16.tar.bz2
> -rw-r--r--.     270949 Sep 27 23:46 ncr-0.2.tar.gz
> -rw-r--r--.     300609 Sep 27 21:50 openct-master.zip
> -rw-r--r--.    2008663 Sep 27 21:50 opensc-0.13.0g20130827105820.tar.gz
> -rw-r--r--.    1946899 Sep 27 21:50 opensc-0.13.0.tar.gz
> -rw-rw-r--.    2027349 Sep 28 21:12 opensc-doug.tar.gz
> -rw-r--r--.    4459777 Sep 27 23:46 openssl-1.0.1e.tar.gz
> -rw-r--r--.     551751 Sep 27 21:50 pcsc-lite-1.8.8.tar.bz2
> -rw-r--r--.     755165 Sep 28 01:08 xca-0.9.3.tar.gz
>
> I used the 3 files forked by Doug
>     engine_pkcs11-doug.tar.bz2
>     libp11-doug.tar.gz
>     opensc-doug.tar.gz
> from https://github.com/dengert/ .
>
> Also I notice openssl is slower with cryptodev than without.
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
> _______________________________________________
> Opensc-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/opensc-devel
>


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Smartcard-HSM on Linux not found

lists
Andreas,

> Can you check if the pcsc daemon is running ?
> Can you also try opensc-tool -i -vvv to see what's going wrong ?

> The SmartCard-HSM USB-stick has a build-in CCID card reader that should
> be recognized by the pcscd as SCM card reader. There is no driver
> installation required on Windows/Linux/MacOS.

> Also try to run pcscd in foreground mode with
> pcscd -a -d -f

pcscd was not running but after I run it (as root) "pcscd -a -d -f" and it produces output such as
 00010109 readerfactory.c:1309:RFWaitForReaderInit() Waiting init for reader: SCM Microsystems Inc. SCR35xx v2.0 USB SC Reader [CCID Interface] 00 00
 00002671 eventhandler.c:256:EHStatusHandlerThread() powerState: POWER_STATE_POWERED
 00000054 Card ATR: 3B FE 18 00 00 81 31 FE 45 80 31 81 54 48 53 4D 31 73 80 21 40 81 07 FA
 05008000 ifdhandler.c:1122:IFDHPowerICC() action: PowerDown, usb:04e6/5410:libudev:0:/dev/bus/usb/004/003 (lun: 0)
 00003993 eventhandler.c:446:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED

my command then says
 $ opensc-tool -i -vvv
 opensc 0.13.0 [gcc  4.8.1 20130603 (Red Hat 4.8.1-1)]
 Enabled features: zlib openssl pcsc(libpcsclite.so.1)
 0x7f3cdde2a740 21:21:15.084 [opensc-tool] ../../../opensc-doug/src/libopensc/ctx.c:797:sc_release_context: called
 0x7f3cdde2a740 21:21:15.084 [opensc-tool] ../../../opensc-doug/src/libopensc/reader-pcsc.c:745:pcsc_finish: called

 $ pcscd -v
 pcsc-lite version 1.8.8.
 Copyright (C) 1999-2002 by David Corcoran <[hidden email]>.
 Copyright (C) 2001-2011 by Ludovic Rousseau <[hidden email]>.
 Copyright (C) 2003-2004 by Damien Sauveron <[hidden email]>.
 Report bugs to <[hidden email]>.
 Enabled features: Linux x86_64-redhat-linux-gnu serial usb libudev usbdropdir=/usr/lib64/pcsc/drivers ipcdir=/var/run/pcscd configdir=/etc/reader.conf.d
 
 $ ldd /sbin/pcscd
        linux-vdso.so.1 =>  (0x00007fff9f7fe000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003bcc800000)
        libudev.so.1 => /lib64/libudev.so.1 (0x00000034e4600000)
        librt.so.1 => /lib64/librt.so.1 (0x0000003bce000000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003bccc00000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003bcc400000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003bcc000000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003bce400000)

 $ cat -n /etc/reader.conf.d/libccidtwin
     1  # Gemalto reader with serial communication
     2  #  - n is the serial port to use n in [0..3]
     3  #  - reader is the reader name. It is needed for multi-slot readers.
     4  #    Possible reader values are: GemPCPinPad, GemCorePOSPro, GemCoreSIMPro,
     5  #    GemPCTwin (default value)
     6  # example: /dev/ttyS0:GemPCPinPad
     7  #FRIENDLYNAME      "GemPCTwin serial"
     8  #DEVICENAME        /dev/ttySn[:reader]
     9  #LIBPATH           /usr/lib64/pcsc/drivers/serial/libccidtwin.so
    10  #CHANNELID         n


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Smartcard-HSM on Linux not found

Andreas Schwier (ML)
Ah, try opensc-tool -n instead of -i.

-i only shows information about OpenSC, but not the attached device.

Also try pkcs15-tool -D to list all card objects.



Am 10.10.2013 22:38, schrieb [hidden email]:

> Andreas,
>
>> Can you check if the pcsc daemon is running ?
>> Can you also try opensc-tool -i -vvv to see what's going wrong ?
>
>> The SmartCard-HSM USB-stick has a build-in CCID card reader that should
>> be recognized by the pcscd as SCM card reader. There is no driver
>> installation required on Windows/Linux/MacOS.
>
>> Also try to run pcscd in foreground mode with
>> pcscd -a -d -f
>
> pcscd was not running but after I run it (as root) "pcscd -a -d -f" and it produces output such as
>  00010109 readerfactory.c:1309:RFWaitForReaderInit() Waiting init for reader: SCM Microsystems Inc. SCR35xx v2.0 USB SC Reader [CCID Interface] 00 00
>  00002671 eventhandler.c:256:EHStatusHandlerThread() powerState: POWER_STATE_POWERED
>  00000054 Card ATR: 3B FE 18 00 00 81 31 FE 45 80 31 81 54 48 53 4D 31 73 80 21 40 81 07 FA
>  05008000 ifdhandler.c:1122:IFDHPowerICC() action: PowerDown, usb:04e6/5410:libudev:0:/dev/bus/usb/004/003 (lun: 0)
>  00003993 eventhandler.c:446:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED
>
> my command then says
>  $ opensc-tool -i -vvv
>  opensc 0.13.0 [gcc  4.8.1 20130603 (Red Hat 4.8.1-1)]
>  Enabled features: zlib openssl pcsc(libpcsclite.so.1)
>  0x7f3cdde2a740 21:21:15.084 [opensc-tool] ../../../opensc-doug/src/libopensc/ctx.c:797:sc_release_context: called
>  0x7f3cdde2a740 21:21:15.084 [opensc-tool] ../../../opensc-doug/src/libopensc/reader-pcsc.c:745:pcsc_finish: called
>
>  $ pcscd -v
>  pcsc-lite version 1.8.8.
>  Copyright (C) 1999-2002 by David Corcoran <[hidden email]>.
>  Copyright (C) 2001-2011 by Ludovic Rousseau <[hidden email]>.
>  Copyright (C) 2003-2004 by Damien Sauveron <[hidden email]>.
>  Report bugs to <[hidden email]>.
>  Enabled features: Linux x86_64-redhat-linux-gnu serial usb libudev usbdropdir=/usr/lib64/pcsc/drivers ipcdir=/var/run/pcscd configdir=/etc/reader.conf.d
>  
>  $ ldd /sbin/pcscd
>         linux-vdso.so.1 =>  (0x00007fff9f7fe000)
>         libdl.so.2 => /lib64/libdl.so.2 (0x0000003bcc800000)
>         libudev.so.1 => /lib64/libudev.so.1 (0x00000034e4600000)
>         librt.so.1 => /lib64/librt.so.1 (0x0000003bce000000)
>         libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003bccc00000)
>         libc.so.6 => /lib64/libc.so.6 (0x0000003bcc400000)
>         /lib64/ld-linux-x86-64.so.2 (0x0000003bcc000000)
>         libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003bce400000)
>
>  $ cat -n /etc/reader.conf.d/libccidtwin
>      1  # Gemalto reader with serial communication
>      2  #  - n is the serial port to use n in [0..3]
>      3  #  - reader is the reader name. It is needed for multi-slot readers.
>      4  #    Possible reader values are: GemPCPinPad, GemCorePOSPro, GemCoreSIMPro,
>      5  #    GemPCTwin (default value)
>      6  # example: /dev/ttyS0:GemPCPinPad
>      7  #FRIENDLYNAME      "GemPCTwin serial"
>      8  #DEVICENAME        /dev/ttySn[:reader]
>      9  #LIBPATH           /usr/lib64/pcsc/drivers/serial/libccidtwin.so
>     10  #CHANNELID         n
>


--

    ---------    CardContact Software & System Consulting
   |.##> <##.|   Andreas Schwier
   |#       #|   Schülerweg 38
   |#       #|   32429 Minden, Germany
   |'##> <##'|   Phone +49 571 56149
    ---------    http://www.cardcontact.de
                 http://www.tscons.de
                 http://www.openscdp.org


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Smartcard-HSM on Linux not found

lists
andreas.schwier.ml cardcontact.de  wrote:

> Ah, try opensc-tool -n instead of -i.
> -i only shows information about OpenSC, but not the attached device.
> Also try pkcs15-tool -D to list all card objects.

$ opensc-tool -n -vvv
No smart card readers found.
0x7fd5993d5740 08:33:45.158 [opensc-tool] ../../../opensc-doug/src/libopensc/ctx.c:797:sc_release_context: called
0x7fd5993d5740 08:33:45.159 [opensc-tool] ../../../opensc-doug/src/libopensc/reader-pcsc.c:745:pcsc_finish: called
 
$  pkcs15-tool -D
No smart card readers found.

That is with "pcscd -a -f -d" running as root.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Smartcard-HSM on Linux not found

Ludovic Rousseau
2013/10/11  <[hidden email]>:

> andreas.schwier.ml cardcontact.de  wrote:
>
>> Ah, try opensc-tool -n instead of -i.
>> -i only shows information about OpenSC, but not the attached device.
>> Also try pkcs15-tool -D to list all card objects.
>
> $ opensc-tool -n -vvv
> No smart card readers found.
> 0x7fd5993d5740 08:33:45.158 [opensc-tool] ../../../opensc-doug/src/libopensc/ctx.c:797:sc_release_context: called
> 0x7fd5993d5740 08:33:45.159 [opensc-tool] ../../../opensc-doug/src/libopensc/reader-pcsc.c:745:pcsc_finish: called
>
> $  pkcs15-tool -D
> No smart card readers found.
>
> That is with "pcscd -a -f -d" running as root.

The token is correctly discovered by pcscd.
The problem is between pcscd and OpenSC. Maybe OpenSC is not
configured correctly and can't find the PC/SC provider_library.

Edit your file /etc/opensc/opensc.conf and check the value of provider_library.
provider_library should be set to the libpcsclite.so.1 installed by pcsc-lite.

Bye

--
 Dr. Ludovic Rousseau

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Smartcard-HSM on Linux not found

Andreas Schwier (ML)
In reply to this post by lists
Looks like the OpenSC tools do not find the pcsc daemon. Do have
different versions of libpcsclite laying around ?

Do you get output from running pcsc_scan ?

Is the user part of the pcscd group ?

Am 11.10.2013 09:40, schrieb [hidden email]:

> andreas.schwier.ml cardcontact.de  wrote:
>
>> Ah, try opensc-tool -n instead of -i.
>> -i only shows information about OpenSC, but not the attached device.
>> Also try pkcs15-tool -D to list all card objects.
>
> $ opensc-tool -n -vvv
> No smart card readers found.
> 0x7fd5993d5740 08:33:45.158 [opensc-tool] ../../../opensc-doug/src/libopensc/ctx.c:797:sc_release_context: called
> 0x7fd5993d5740 08:33:45.159 [opensc-tool] ../../../opensc-doug/src/libopensc/reader-pcsc.c:745:pcsc_finish: called
>  
> $  pkcs15-tool -D
> No smart card readers found.
>
> That is with "pcscd -a -f -d" running as root.
>


--

    ---------    CardContact Software & System Consulting
   |.##> <##.|   Andreas Schwier
   |#       #|   Schülerweg 38
   |#       #|   32429 Minden, Germany
   |'##> <##'|   Phone +49 571 56149
    ---------    http://www.cardcontact.de
                 http://www.tscons.de
                 http://www.openscdp.org


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel