Ticket #422 (new regression)

NB! Read about ReportingBugs before filing a ticket!

Opened 4 months ago

Last modified 8 days ago

Support for Aventra MyEID PKI card is broken in OpenSC 0.12.2

Reported by: crank Owned by: opensc-devel@…
Priority: normal Milestone:
Component: opensc Version: 0.12.2
Severity: major Keywords: MyEID
Cc: Blocked By:
Blocking:

Description

Initializing a new MyEID card with

pkcs15-init -C --pin 1111 --puk 1111

fails with the following messages:

Using reader with a card: SCM SCR 3310 [CCID Interface] (21120615408287) 00 00

Failed to read PIN: Not supported

Failed to create PKCS #15 meta structure: Generic PKCS#15 initialization error

The same command worked with opensc 0.12.1 (and the same environment) without problems.

My environment:

Ubuntu 11.04 64-bit

pcsc-lite version 1.7.0.

opensc 0.12.2 [gcc 4.5.2]

Enabled features: zlib readline openssl pcsc(libpcsclite.so.1)

opensc-tool -a says:

Using reader with a card: SCM SCR 3310 [CCID Interface] (21120615408287) 00 00

3b:f5:18:00:00:81:31:fe:45:4d:79:45:49:44:9a

opensc-tool -n says:

Using reader with a card: SCM SCR 3310 [CCID Interface] (21120615408287) 00 00

MyEID cards with PKCS#15 applet

I'm attaching the output of

pkcs15-init -C --pin 1111 --puk 1111 -v -v -v

Attachments

opensc.out Download (39.6 KB) - added by crank 4 months ago.
output of pkcs15-init

Change History

Changed 4 months ago by crank

output of pkcs15-init

comment:1 Changed 8 days ago by alfadir

I had the same problem using Debian sid package opensc 0.12.2-2, of today (2012-05-15). I have a different reader :

Using reader with a card: ACS AET65 00 00
MyEID cards with PKCS#15 applet

The problem was as described :

About to create PKCS #15 meta structure.
Failed to read PIN: Not supported

The same debug information as in the attached bug report,

card-myeid.c:1015:myeid_card_ctl: returning with: -1408 (Not supported)
iso7816.c:103:iso7816_check_sw: File not found

That seems just to be "normal" for this card ?

I planned to do a git bisect to find the bug, but the trunk solved my problem.

By checking out trunk (2012-05-15) and running pkcs15-init the problem dissapeared. After running it once and pressing Ctrl-C on the SO PIN question, I could run the normal debian command and it was successful.

This is what I did (Normal development tools are a requirement) :

cd $HOME
mkdir -p dev/src  dev/root
cd dev/src
git clone https://github.com/OpenSC/OpenSC.git
cd OpenSC/
./bootstrap
./configure --prefix=$HOME/dev/root
# apt-file search winscard.h
sudo apt-get install libpcsclite-dev
./configure --prefix=$HOME/dev/root
make
mkdir $HOME/dev/root/etc/
mkdir $HOME/dev/root/lib/pkcs11/
make install
cd $HOME/dev/root/bin/
export LD_LIBRARY_PATH=$HOME/dev/root/lib
./pkcs15-init -C --pin 1111 --puk 1111 -v -v -v -v
[CTRL-C]

Then in a new xterm without LD_LIBRARY_PATH this also worked

pkcs15-init -C --pin 1111 --puk 1111

Then I was able to use the other commands described in https://www.opensc-project.org/opensc/wiki/MyEID#Initialization

I do not know where the bug was, but this might help someone with the same problem. Once trunk is released and packaged for Debian and Ubuntu, the problem should go away.

Last edited 8 days ago by alfadir (previous) (diff)
Note: See TracTickets for help on using tickets.