2009/9/21 Andreas Jellinghaus <a...@dungeon.inka.de>:
> Am Donnerstag 22 Mai 2008 15:42:19 schrieb Georges Bart:
>> > I bought a card from gemalto (Classic TPC IM) and I've got some problem
>> > to interact with it and opensc.
>>
>> I think your card is using the GemSafe v2 applet with a PKCS#15 mapping.
>>
>> I sent a patch last year to try to support this card in OpenSC.
>> http://www.opensc-project.org/pipermail/opensc-user/2007-August/001958.html
>>
>> I attach a new version of the patch against trunk as of today and with
>> corrections suggested by Andreas.
>
> oops, this patch was ignored for some reason.
>
> can everyone please review the patch?
> unless some issue is found, I think we should
> apply it.

This patch is not finished and will lock many cards.
The PIN sent to the card is hard coded inside the source code in
./src/libopensc/card-gemsafeV2.c:

static const u8 pin[] = {0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

So if your PIN is not "123456" you will lock your card.

> I'm not 100% sure why the new function sc_pkcs15_read_file_key_ref is needed,
> or if we can handle that some other way. but it's not a big deal if we mark
> it "gemsave V2 workaround" and keep that change.

I made some comments in
http://www.opensc-project.org/pipermail/opensc-user/2007-August/001958.html

I attach a patch to use the Gemsafe v2 card.
some specificity
- some DF can't be parsed if the PIN code is not submitted before
  So I submit the PIN right in the gemsafeV2_init function (before the
card is parsed)
- the public keys are read by key ref. I added a
sc_pkcs15_read_file_key_ref() function
- the get data command is a bit different


I do not use/work on this code any more so I can't really help.

Ciao

-- 
GB
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to