libopensc: few debug messages more
This commit is contained in:
parent
6d4a4dfae0
commit
91a28c613c
@ -257,9 +257,11 @@ sc_check_apdu(sc_card_t *card, const sc_apdu_t *apdu)
|
||||
{
|
||||
if ((apdu->cse & ~SC_APDU_SHORT_MASK) == 0) {
|
||||
/* length check for short APDU */
|
||||
if (apdu->le > 256 || (apdu->lc > 255 && (apdu->flags & SC_APDU_FLAGS_CHAINING) == 0))
|
||||
if (apdu->le > 256 || (apdu->lc > 255 && (apdu->flags & SC_APDU_FLAGS_CHAINING) == 0)) {
|
||||
sc_log(card->ctx, "failed length check for short APDU");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
else if ((apdu->cse & SC_APDU_EXT) != 0) {
|
||||
/* check if the card supports extended APDUs */
|
||||
if ((card->caps & SC_CARD_CAP_APDU_EXT) == 0) {
|
||||
@ -267,9 +269,11 @@ sc_check_apdu(sc_card_t *card, const sc_apdu_t *apdu)
|
||||
goto error;
|
||||
}
|
||||
/* length check for extended APDU */
|
||||
if (apdu->le > 65536 || apdu->lc > 65535)
|
||||
if (apdu->le > 65536 || apdu->lc > 65535) {
|
||||
sc_log(card->ctx, "failed length check for extended APDU");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
else {
|
||||
goto error;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user