Hello Jean-Pierre, Frank,
Le 27/05/2011 17:27, JP Szikora a écrit :
Hi Viktor,
The change that you pushed in OpenSC SVN r5237 breaks completely the support
for Belgian eID (eidenv, pkcs15-tool, opensc-pksc11.so usage with Firefox is
not working anymore after this revision).
Could you test the attached patch, please ?
Kind regards,
Viktor.
Index: src/libopensc/iso7816.c
===================================================================
--- src/libopensc/iso7816.c (révision 5507)
+++ src/libopensc/iso7816.c (copie de travail)
@@ -122,8 +122,7 @@
}
assert(count <= (card->max_recv_size > 0 ? card->max_recv_size : 256));
- sc_format_apdu(card, &apdu, SC_APDU_CASE_2_SHORT, 0xB0,
- (idx >> 8) & 0x7F, idx & 0xFF);
+ sc_format_apdu(card, &apdu, SC_APDU_CASE_2_SHORT, 0xB0, (idx >> 8) &
0x7F, idx & 0xFF);
apdu.le = count;
apdu.resplen = count;
apdu.resp = recvbuf;
@@ -141,9 +140,10 @@
if (apdu.resplen < count) {
r = iso7816_read_binary(card, idx + apdu.resplen, buf +
apdu.resplen, count - apdu.resplen, flags);
- SC_TEST_RET(ctx, SC_LOG_DEBUG_NORMAL, r, "APDU transmit
failed");
-
- apdu.resplen += r;
+ if (r == SC_ERROR_CORRUPTED_DATA)
+ SC_TEST_RET(ctx, SC_LOG_DEBUG_NORMAL, r, "APDU transmit
failed");
+ else if (r > 0)
+ apdu.resplen += r;
}
SC_FUNC_RETURN(ctx, SC_LOG_DEBUG_VERBOSE, apdu.resplen);
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel