Changing the size for 0.11.2 may not be a good idea. It might cause
problems with to many existing cards.

Maybe it should be held off until 0.11.3 after each card is
examined for its own limit and a way to get the limit for the
reader from PCSC and OpenCT is also added.

The opensc.conf file can still be used to override the
max_send_size and max_recv_size as we are doing with 0.11.1.



Andreas Jellinghaus wrote:
Am Dienstag, 20. März 2007 02:19 schrieb Chaskiel Grundman:
On 3/12/07, Andreas Jellinghaus <[EMAIL PROTECTED]> wrote:
 I also changed the chop size in 3127 to
256 and added a comment. this needs a lot of testing, I fear
some combinations of readers and cards might break. but editing
the opensc.conf should be able to fix it.
When trying to create a user pin on a cryptoflex/egate, I get this error:

apdu.c:341:sc_check_apdu: Invalid Case 3 short APDU:
cse=03 cla=c0 ins=d6 p1=00 p2=00 lc=256 le=0
resp=(nil) resplen=0 data=0x805f4d8 datelen=256
iso7816.c:288:iso7816_update_binary: APDU transmit failed: Invalid
arguments card.c:514:sc_update_binary: returning with: Invalid arguments

lc cannot exceed 255 bytes for a short apdu. should the default
max_send_size take this into account?
 >> if max_send_size is only supposed to affect short apdus, it should be set
to 255, not 256

He is right. The max_send_size should be 255 because of Lc. (The max_recv_size
can be 256, as Le=0 means 256) The apdu.c chaining code uses 255 and the card-piv.c uses the chaining code and 255 works for it.



that would break some cards again, if I understand the situation correctly.
what about code like this in card-flex.c: card-miocos.c: if (card->max_send_size > 244)
card-miocos.c:          card->max_send_size = 244;
card-miocos.c:  if (card->max_recv_size > 244)
card-miocos.c:          card->max_recv_size = 244;
with 255 or whatever is appropriate?


This may also be needed for each card, as the *card* may have its own limits
which are less then the reader or less then ISO 7816.

Do you want to reconsider what are the default limits in 0.11.2?
At least the max_send_size = 255;

But maybe this change should be held off till 0.11.3 after
each type of card is examined to see if it has a limit,
and code to get the limit from the reader is also added.





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



--

 Douglas E. Engert  <[EMAIL PROTECTED]>
 Argonne National Laboratory
 9700 South Cass Avenue
 Argonne, Illinois  60439
 (630) 252-5444
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to