added debugging of invalid apdus
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@273 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -497,6 +497,8 @@ perform_PC_to_RDR_XfrBlock(const u8 *in, size_t inlen, __u8** out, size_t *outle
|
||||
sc_result = build_apdu(ctx, abDataIn, request->dwLength, &apdu);
|
||||
if (sc_result >= 0)
|
||||
sc_result = get_rapdu(&apdu, request->bSlot, &abDataOut, &abDataOutLen);
|
||||
else
|
||||
bin_log(ctx, "Invalid APDU", abDataIn, request->dwLength);
|
||||
}
|
||||
|
||||
sc_result = get_RDR_to_PC_DataBlock(request->bSlot, request->bSeq, sc_result,
|
||||
@@ -1122,8 +1124,10 @@ perform_PC_to_RDR_Secure(const __u8 *in, size_t inlen, __u8** out, size_t *outle
|
||||
}
|
||||
|
||||
sc_result = build_apdu(ctx, abPINApdu, apdulen, &apdu);
|
||||
if (sc_result < 0)
|
||||
if (sc_result < 0) {
|
||||
bin_log(ctx, "Invalid APDU", abDataIn, request->dwLength);
|
||||
goto err;
|
||||
}
|
||||
apdu.sensitive = 1;
|
||||
|
||||
new_pin.min_length = curr_pin.min_length = wPINMaxExtraDigit >> 8;
|
||||
|
||||
@@ -143,7 +143,7 @@ int pace_translate_apdus(struct sm_ctx *sctx, sc_card_t *card)
|
||||
|
||||
r = build_apdu(card->ctx, buf, apdulen, &apdu);
|
||||
if (r < 0) {
|
||||
sc_error(card->ctx, "Could not format APDU");
|
||||
bin_log(ctx, "Invalid APDU", abDataIn, request->dwLength);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user