Hi Martin!

2011/7/18 Martin Paljak <mar...@martinpaljak.net>

> > Some reader expect just 4 bytes (CLA INS P1 P2) without Le. Some other
> > readers insist on getting a 0-Le byte. And very few readers handle both
> cases.
>
> This should be tested and documented if possible. Creating conditional
> reader-specific code is probably inevitable.
>

Maybe Ludouvic can add this information to his CCID reader matrix
http://pcsclite.alioth.debian.org/ccid/iManufacturer.html in the
limitation column

 > And they should use better return codes than 6B:80 (no idea what this
> > SW-value is supposed to mean)
> This is from PC/SC v2 spec
>
> case 0x6B80: /* Wrong data in the buffer, rejected by firmware */
>

I was absolutely sure that all PC/SC v2 codes start with 64xx. But you
are right - there's one exception :-)

Since the Xiring people are using a correct error code chances are pretty
good that their readers do support the 4-byte APDU-template only.

I just checked my own code. I'm using the 4-byte APDU-template with
almost all readers and the 5-byte verion with only a few (broken) readers.

So maybe we should change this in OpenSC too.

Another idea: if a 5-byte template fails with the above SW 6B80 we could
try the 4-byte template as well. This would make Johannes happy and
would not brake working SPE support with other readers.

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

Reply via email to