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

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?

Regards, Andreas
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to