- added le/lc to apdu debugging

- fixed byte order problem for PC_to_RDR_XfrBlock
- cats-tool: added simulation of part of TA/CA


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@275 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
frankmorgner
2010-09-23 19:36:20 +00:00
parent f6d92dfece
commit a87fd00b88
3 changed files with 45 additions and 6 deletions

View File

@@ -494,11 +494,14 @@ perform_PC_to_RDR_XfrBlock(const u8 *in, size_t inlen, __u8** out, size_t *outle
if (request->bSlot > sizeof *card_in_slot)
sc_result = SC_ERROR_INVALID_DATA;
else {
sc_result = build_apdu(ctx, abDataIn, request->dwLength, &apdu);
sc_result = build_apdu(ctx, abDataIn, __le32_to_cpu(request->dwLength),
&apdu);
if (sc_result >= 0)
sc_result = get_rapdu(&apdu, request->bSlot, &abDataOut, &abDataOutLen);
sc_result = get_rapdu(&apdu, request->bSlot, &abDataOut,
&abDataOutLen);
else
bin_log(ctx, "Invalid APDU", abDataIn, request->dwLength);
bin_log(ctx, "Invalid APDU", abDataIn,
__le32_to_cpu(request->dwLength));
}
sc_result = get_RDR_to_PC_DataBlock(request->bSlot, request->bSeq, sc_result,