It's true, on version 0.9.6 is working SPK 2.4 smartcards. But on version 0.11.0 isn't working.
The changes are:
* add SPK 2.4 ATR;
* alter the smartcard name;
* alter the return value for starcos_match_card function (now returns always 1 instead of i value.
And that is it !!! Can you help me now ??? it's a good problem, I think ...
thanks,
Tulio Salvaro
On 9/4/06, Tulio Salvaro <
[EMAIL PROTECTED]> wrote:
Hello,
I am using a test smartcard then I can erased and create a pkcs15 structure.
I try with SPK 2.4:
17:09 waikiki:../src/libopensc # pkcs15-init -v -E -C --no-so-pin
Connecting to card in reader Gemplus GemPC Twin 00 00...
Using card driver STARCOS SPK 2.3/2.4.About to erase card.
About to create PKCS #15 meta structure.
iso7816.c:99:iso7816_check_sw: Wrong length
card-starcos.c:312:starcos_select_fid: returning with: Wrong length
card-starcos.c:499:starcos_select_file: SELECT FILE (DF-ID) failed: Wrong length
card.c:563:sc_select_file: returning with: Wrong length
Failed to create PKCS #15 meta structure: Wrong length
17:09 waikiki:../src/libopensc #
with SPK 2.3:
17:09 waikiki:../src/libopensc # pkcs15-init -v -E -C --no-so-pin
Connecting to card in reader Gemplus GemPC Twin 00 00...
Using card driver STARCOS SPK 2.3/2.4.About to erase card.
About to create PKCS #15 meta structure.
17:16 waikiki:../src/libopensc #
About the OpenSC old version, I will try again that patch with 0.9.6 version ...
Do you have any idea ???
thanks ..Tulio SalvaroOn 9/4/06, Nils Larsch <[EMAIL PROTECTED]> wrote:
you mean the above patch worked with an old opensc version but fails
with a current version ? Which software did you use to initialize
the tokens ?
Cheers,
NilsTulio Salvaro wrote:
> Well,
>
> I tried to use SPK 2.4 smartcards but it has not worked. I changed
> two structs from the card-starcos.c file:
>
> static struct sc_atr_table starcos_atrs[] = {
> { "3B:B7:94:00:c0:24:31:fe:65:53:50:4b:32:33:90:00:b4", NULL,
> NULL, SC_CARD_TYPE_STARCOS_GENERIC, 0, NULL },
> { "3B:B7:94:00:81:31:fe:65:53:50:4b:32:33:90:00:d1", NULL, NULL,
> SC_CARD_TYPE_STARCOS_GENERIC, 0, NULL },
> { "3b:b7:18:00:c0:3e:31:fe:65:53:50:4b:32:34:90:00:25", NULL,
> NULL, SC_CARD_TYPE_STARCOS_GENERIC, 0, NULL },
> { NULL, NULL, NULL, 0, 0, NULL }
> };
>
> static struct sc_card_driver starcos_drv = {
> "STARCOS SPK 2.3/2.4",
> "starcos",
> &starcos_ops,
> NULL, 0, NULL
> };
>
> I put only the ATR value. I compiled and try to use with SPK 2.3:
>
> 16:45 waikiki:../src/libopensc # pkcs15-tool -v -c
> Connecting to card in reader Gemplus GemPC Twin 00 00...
> Using card driver STARCOS SPK 2.3/2.4.
> Trying to find a PKCS#15 compatible card...
> Found Tulio Salvaro !
> Card has 1 certificate(s).
>
> X.509 Certificate [SalvaroCA - Server II]
> Flags : 2
> Authority: no
> Path : 4300
> ID : dc069d6707a8d95b8ed898afa7aef485830591b5
>
> 16:45 waikiki:../src/libopensc #
>
> with SPK 2.4:
> 16:45 waikiki:../src/libopensc # pkcs15-tool -v -c
> Connecting to card in reader Gemplus GemPC Twin 00 00...
> Using card driver STARCOS SPK 2.3/2.4.
> Trying to find a PKCS#15 compatible card...
> pkcs15.c:502:sc_pkcs15_bind_internal: unable to enumerate apps: Wrong length
> pkcs15.c :711:sc_pkcs15_bind: returning with: Unsupported card
> PKCS#15 initialization failed: Unsupported card
> 16:46 waikiki:../src/libopensc #
>
> Once I made this modification and it has worked. OpenSC was a old
> version, maybe 0.9.6 ...--
Tulio Salvaro
GoogleTalk: [EMAIL PROTECTED]
--
Tulio Salvaro
GoogleTalk: [EMAIL PROTECTED]
_______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel