Index: src/libopensc/card-oberthur.c =================================================================== --- src/libopensc/card-oberthur.c (Revision 2969) +++ src/libopensc/card-oberthur.c (Arbeitskopie) @@ -153,12 +153,12 @@ unsigned char cm[7] = {0xA0,0x00,0x00,0x00,0x03,0x00,0x00}; /* Select Card Manager (to deselect previously selected application) */ - sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0xA4, 0x04, 0x00); + sc_format_apdu(card, &apdu, SC_APDU_CASE_4_SHORT, 0xA4, 0x04, 0x00); apdu.lc = sizeof(cm); apdu.le = sizeof(cm)+4; apdu.data = cm; apdu.datalen = sizeof(cm); - apdu.resplen = sizeof(apdu.resp); + apdu.resplen = sizeof(apdu_resp); apdu.resp = apdu_resp; rv = sc_transmit_apdu(card, &apdu); @@ -180,7 +180,7 @@ *(apdu.resp+17)*0x100 + *(apdu.resp+18)); } - sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0xA4, 0x04, 0x00); + sc_format_apdu(card, &apdu, SC_APDU_CASE_4_SHORT, 0xA4, 0x04, 0x00); apdu.resp = apdu_resp; /* Try to select known AID */ @@ -674,5 +674,5 @@ return SC_ERROR_INCORRECT_PARAMETERS; - sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0xA4, p1, 0); + sc_format_apdu(card, &apdu, SC_APDU_CASE_4_SHORT, 0xA4, p1, 0); apdu.resp = rbuf; apdu.resplen = sizeof(rbuf); @@ -680,4 +680,5 @@ apdu.data = buf; apdu.lc = buflen; + apdu.le = 252; rv = sc_transmit_apdu(card, &apdu);