19 NO_PKCS15_APP = 0x6200,
21 PIN_DEACTIVATED = 0x6283,
22 FCI_NO_ISO7816_4 = 0x6284,
23 VERIFICATION_FAILED = 0x6300,
24 INPUT_TIMEOUT = 0x6400,
25 INPUT_CANCELLED = 0x6401,
26 PASSWORDS_DIFFER = 0x6402,
27 PASSWORD_OUTOF_RANGE = 0x6403,
28 CARD_EJECTED_AND_REINSERTED = 0x64a2,
29 EEPROM_CELL_DEFECT = 0x6581,
30 SECURITY_ENVIRONMENT = 0x6600,
31 WRONG_LENGTH = 0x6700,
32 NO_BINARY_FILE = 0x6981,
33 ACCESS_DENIED = 0x6982,
34 PASSWORD_COUNTER_EXPIRED = 0x6983,
35 DIRECTORY_OR_PASSWORD_LOCKED_OR_NOT_ALLOWED = 0x6984,
36 NO_PARENT_FILE = 0x6985,
37 NOT_YET_INITIALIZED = 0x6985,
38 NO_CURRENT_DIRECTORY_SELECTED = 0x6986,
39 DATAFIELD_EXPECTED = 0x6987,
40 INVALID_SM_OBJECTS = 0x6988,
41 COMMAND_NOT_ALLOWED = 0x69f0,
42 INVALID_DATAFIELD = 0x6a80,
43 ALGORITHM_ID = 0x6a81,
44 FILE_NOT_FOUND = 0x6a82,
45 RECORD_NOT_FOUND = 0x6a83,
46 INVALID_PARAMETER = 0x6a86,
47 LC_INCONSISTANT = 0x6a87,
48 PASSWORD_NOT_FOUND = 0x6a88,
49 ILLEGAL_OFFSET = 0x6b00,
50 UNSUPPORTED_CLA = 0x6e00,
51 CANT_DISPLAY = 0x6410,
52 INVALID_P1P2 = 0x6a00,
53 UNSUPPORTED_INS = 0x6d00,
55 PIN_SUSPENDED = 0x63c1,
56 PIN_RETRY_COUNT_2 = 0x63c2,
75 Apdu(
const QByteArray& pBuffer);
79 static const int NO_LE = 0;
80 static const int SHORT_MAX_LC = 0xff;
81 static const int SHORT_MAX_LE = 0x0100;
82 static const int EXTENDED_MAX_LC = 0x00ffff;
83 static const int EXTENDED_MAX_LE = 0x010000;
84 static const char CLA = 0x00;
85 static const char CLA_COMMAND_CHAINING = 0x10;
86 static const char CLA_SECURE_MESSAGING = 0x0c;
87 const QByteArray& getBuffer()
const;
95 bool mUpdateRetryCounter;
97 inline bool isExtendedLength()
const;
100 CommandApdu(
const QByteArray& pBuffer,
bool pUpdateRetryCounter =
false);
101 CommandApdu(
const QByteArray& pHeader,
const QByteArray& pData,
int pLe);
102 CommandApdu(
char pCla,
char pIns,
char pP1,
char pP2,
const QByteArray& pData = QByteArray(),
int pLe =
NO_LE);
114 static bool isExtendedLength(
const QByteArray& pData,
int pLe);
123 static const int RETURN_CODE_LENGTH = 2;
130 virtual void setBuffer(
const QByteArray& pBuffer);
SW1 getSW1() const
Definition: Apdu.cpp:321
char getP2() const
Definition: Apdu.cpp:154
CommandApdu(const QByteArray &pBuffer, bool pUpdateRetryCounter=false)
Definition: Apdu.cpp:42
virtual ~ResponseApdu()
Definition: Apdu.cpp:252
ResponseApdu(StatusCode pStatusCode)
Definition: Apdu.cpp:237
virtual void setBuffer(const QByteArray &pBuffer)
Definition: Apdu.cpp:257
int getRetryCounter() const
Definition: Apdu.cpp:298
char getSW2() const
Definition: Apdu.cpp:332
MORE_DATA_AVAILABLE
Definition: Apdu.h:65
WRONG_LE_FIELD
Definition: Apdu.h:67
CardReturnCode getCardReturnCode() const
Definition: Apdu.cpp:343
char getINS() const
Definition: Apdu.cpp:142
virtual ~CommandApdu()
Definition: Apdu.cpp:131
QByteArray getReturnCodeAsHex() const
Definition: Apdu.cpp:292
int getDataLength() const
Definition: Apdu.cpp:274
ERROR_COMMAND_NOT_ALLOWED
Definition: Apdu.h:66
StatusCode getReturnCode() const
Definition: Apdu.cpp:280
QByteArray mBuffer
Definition: Apdu.h:73
static bool isSecureMessaging(const QByteArray &pCommandBuffer)
Definition: Apdu.cpp:65
static const int NO_LE
Definition: Apdu.h:79
int getLc() const
Definition: Apdu.cpp:166
QByteArray getData() const
Definition: Apdu.cpp:263
char getCLA() const
Definition: Apdu.cpp:136
int getLe() const
Definition: Apdu.cpp:187
QByteArray getData() const
Definition: Apdu.cpp:214
defineEnumType(UiModule, CURRENT, DEFAULT, IDENTIFY, SETTINGS, PINMANAGEMENT) defineEnumType(StatusFormat
UI modules that can be requested to show.
INVALID
Definition: Apdu.h:64
char getP1() const
Definition: Apdu.cpp:148
defineTypedEnumType(StatusCode, quint16, EMPTY=0x0000, INVALID=0x0001, SUCCESS=0x9000, NO_PKCS15_APP=0x6200, END_OF_FILE=0x6282, PIN_DEACTIVATED=0x6283, FCI_NO_ISO7816_4=0x6284, VERIFICATION_FAILED=0x6300, INPUT_TIMEOUT=0x6400, INPUT_CANCELLED=0x6401, PASSWORDS_DIFFER=0x6402, PASSWORD_OUTOF_RANGE=0x6403, CARD_EJECTED_AND_REINSERTED=0x64a2, EEPROM_CELL_DEFECT=0x6581, SECURITY_ENVIRONMENT=0x6600, WRONG_LENGTH=0x6700, NO_BINARY_FILE=0x6981, ACCESS_DENIED=0x6982, PASSWORD_COUNTER_EXPIRED=0x6983, DIRECTORY_OR_PASSWORD_LOCKED_OR_NOT_ALLOWED=0x6984, NO_PARENT_FILE=0x6985, NOT_YET_INITIALIZED=0x6985, NO_CURRENT_DIRECTORY_SELECTED=0x6986, DATAFIELD_EXPECTED=0x6987, INVALID_SM_OBJECTS=0x6988, COMMAND_NOT_ALLOWED=0x69f0, INVALID_DATAFIELD=0x6a80, ALGORITHM_ID=0x6a81, FILE_NOT_FOUND=0x6a82, RECORD_NOT_FOUND=0x6a83, INVALID_PARAMETER=0x6a86, LC_INCONSISTANT=0x6a87, PASSWORD_NOT_FOUND=0x6a88, ILLEGAL_OFFSET=0x6b00, UNSUPPORTED_CLA=0x6e00, CANT_DISPLAY=0x6410, INVALID_P1P2=0x6a00, UNSUPPORTED_INS=0x6d00, PIN_BLOCKED=0x63c0, PIN_SUSPENDED=0x63c1, PIN_RETRY_COUNT_2=0x63c2,) defineEnumType(SW1
bool isUpdateRetryCounter() const
Definition: Apdu.cpp:231