class documentation

class ISO7816_4ErrorChecker(ErrorChecker):

View In Hierarchy

ISO7816-4 error checking strategy.

This strategy raises the following exceptions:

  • sw1 sw2
  • 62 00 81 82 83 84 FF WarningProcessingException
  • 63 00 81 C0->CF WarningProcessingException
  • 64 00 ExecutionErrorException
  • 67 00 CheckingErrorException
  • 68 81 82 CheckingErrorException
  • 69 81->88 99? c1? CheckingErrorException
  • 6a 80->88 CheckingErrorException
  • 6b 00 CheckingErrorException
  • 6d 00 CheckingErrorException
  • 6e 00 CheckingErrorException
  • 6f 00 CheckingErrorException

This checker does not raise exceptions on undefined sw1 values, e.g.:

  • sw1 sw2
  • 65 any
  • 66 any
  • 6c any

and on undefined sw2 values, e.g.:

  • sw1 sw2
  • 62 80 85
  • 6b any except 00

Use another checker in the error checking chain, e.g., the ISO7816_4SW1ErrorChecker, to raise exceptions on these undefined values.

Method __call__ Called to test data, sw1 and sw2 for error.
def __call__(self, data, sw1, sw2):

Called to test data, sw1 and sw2 for error.

Derived classes must raise a smartcard.sw.SWExceptions upon error.

Parameters
dataapdu response data
sw1apdu data status words
sw2apdu data status words