Hello, On Apr 20, 2011, at 13:22 , Frank Morgner wrote: > In the svn tree there is a change that breaks my code: The ISO driver > automatically sends read binary APDUs until the number of requested > bytes is reached (iso7816.c:136). You mean r5237 [1] ?
> Previously only one APDU was sent. The > change surely intendeds to read as much as possible (and requested). The > problem is that 6282 is only recognized when the card returns 0 bytes of > data (iso7816.c:132). SW 6282 as in "End of file or record reached before reading Le bytes" > There are three alternatives for a fix, I think: > 1. Offer a flag to disable the new behaviour as it is done for get > response with SC_APDU_FLAGS_NO_GET_RESP. Flag for sc_read_binary I assume? > 2. Offer a possibilities to read a file to EOF. > 3. Correctly recognize 6282 even when data is present. How would the two approaches differ? 2) would return as much as possible, ignoring such (meaningless in some context?) errors and 3) would correctly raise the error, even if data is received? I think that a flag could be invented for switching between these two modes of operation (the otherwise unused "flags" parameter to sc_read_binary). The default could be the mode that honors passed in parameters. [1] http://www.opensc-project.org/opensc/changeset/5237 -- @MartinPaljak.net +3725156495 _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel