Hi,
this is my first message, so first and foremost I want to tell you that I am
very pleased to develop in OpenSC.
I am currently working on the Oberthur's Cosmo One card (V7.0.1-n) support,
for an important project. I have access to Oberthur ressources, and they are
ready to help. Basically, my wish is to contribute with Viktor Tarasov to the
IASECC support (my card is compliant).
Sadly, I encounter a problem when I try to create or delete an object (or even
generate a key pair), whereas finding and reading objects seem to work
perfectly. It doesn't work at all because each time a bad "select" APDU refers
to a non existing file (always the same).
Let's talk APDU ! :)
Each time it fails and whatever the object is, I have something like:
99999999 APDU: 00 A4 04 00 10 A0 00 00 00 77 01 08 00 07 00 00 FE 00 00 01 00
00
00035159 SW: 90 00
00000163 APDU: 00 A4 09 04 04 50 15 49 46 00
00014831 SW: 6A 82
The second select (A4) fails, and it stops here (so basically, it only sends
two commands). I do not understand where the reference for this (wrong) EF
comes from. According to the source code, this path is directly given to the
concerned function (e.g. iasecc_delete_file) by opensc library core. How can
read work and delete fail ? Is there a wrong object reference in the driver
source code for my card ?
As I possess the official Oberthur PKCS#11 implementation, I have done a
deletion test (on the certificate public key, first object to appear), to
compare APDUs:
40314681 APDU: 00 A4 04 0C 0D E8 28 BD 08 0F F2 50 4F 54 20 41 57 50
00013590 SW: 90 00
00000596 APDU: 00 A4 01 04 02 34 02
00015407 SW: 62 18 80 02 03 0A 82 01 01 83 02 34 02 88 00 A1 06 8C 04 43 00 00
00 8A 01 05 90 00
// this is the deletion
00000764 APDU: 00 E4 00 00 00
00203285 SW: 90 00
// then it selects again and update the EF several times with a "FF FF..."
sequence
I have noticed that the first APDU sequence is already used when I enter the
PIN code (which is padded, I have already patched Viktor's source code to do
so, I will submit my patch later):
00005619 APDU: 00 A4 04 0C 10 A0 00 00 00 77 01 08 00 07 00 00 FE 00 00 01 00
00034375 SW: 90 00
00000502 APDU: 00 A4 04 0C 0D E8 28 BD 08 0F F2 50 4F 54 20 41 57 50
00012737 SW: 90 00
00004576 APDU: 00 20 00 01 40 39 39 39 39 FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
00041243 SW: 90 00
I don't know if it can help...
I must confess that I do not understand well the process to find EFs
addresses, but it seems that I have a bug on it. I am sure that this is a
piece of cake for you, isn't it ? :)
Thank you for your help ! If you want more logs (maybe the initialization
sequence ?), I can naturally provide you so.
Kind Regards,
--
Gilles Blanc - [email protected]
Ingénieur expert informatique embarquée
Représentant du personnel - Secrétaire du CE
Groupe LINAGORA - http://www.linagora.com
Tél.: +33(0)1 46 96 63 39 - Fax : +33(0)1 46 96 63 64
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel