Hello, On Fri, May 4, 2012 at 8:05 AM, Nguyễn Hồng Quân <quanngu...@mbm.vn> wrote: > Hello all, > > I tried to send extend APDU in opensc-explorer with this command: > apdu 00CA0065000800 > and found that the command failed due to insufficient buffer, which had > been automatically allocated: It has not been autoamtically allocated, if you look in opensc-explorer.c you see:
u8 rbuf[SC_MAX_APDU_BUFFER_SIZE]; Which is, indeed, defined as 261 There is also a different define for extended APDU-s: SC_MAX_EXT_APDU_BUFFER_SIZE (64kB) > Do we consider this a bug? It is not a bug in apdu.c, but a deficiency in opensc-explorer. The simplest would be to extend all buffers in opensc-explorer.c application to use the extended APDU buffer, but it feels somewhat wasting (not a real concern on PC-s, where it is supposed to be run anyway) As extended APDU-s might not work with all cards or in all readers or under other certain circumstances, it would be best to have a flipswitch command in opensc-explorer to turn the extended APDU mode on or off, and turning it on might fail, if some tests fail (like T=0 is being used, which could be then switched to T=1 mode if the card did both, or if the reader did not support extended APDU-s etc). In fact, this test and functionality should be a central part of OpenSC. Martin _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel