AusweisApp
Lade ...
Suche ...
Keine Treffer
ResponseApdu.h
gehe zur Dokumentation dieser Datei
1
5#pragma once
6
7#include "CardReturnCode.h"
8#include "EnumHelper.h"
9#include "LogPrivacy.h"
10
11
12namespace governikus
13{
15 UNKNOWN = 0x0000,
16 SUCCESS = 0x9000,
17 NO_PKCS15_APP = 0x6200,
18 END_OF_FILE = 0x6282,
19 PIN_DEACTIVATED = 0x6283,
20 FCI_NO_ISO7816_4 = 0x6284,
21 VERIFICATION_FAILED = 0x6300,
22 INPUT_TIMEOUT = 0x6400,
23 INPUT_CANCELLED = 0x6401,
24 PASSWORDS_DIFFER = 0x6402,
25 PASSWORD_OUTOF_RANGE = 0x6403,
27 EEPROM_CELL_DEFECT = 0x6581,
28 SECURITY_ENVIRONMENT = 0x6600,
29 WRONG_LENGTH = 0x6700,
30 NO_BINARY_FILE = 0x6981,
32 ACCESS_DENIED = 0x6982,
35 NO_PARENT_FILE = 0x6985,
36 NOT_YET_INITIALIZED = 0x6985,
38 DATAFIELD_EXPECTED = 0x6987,
39 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,
54 PIN_BLOCKED = 0x63C0, // retries left: 0
55 PIN_SUSPENDED = 0x63C1, // retries left: 1
56 PIN_RETRY_COUNT_2 = 0x63C2, // retries left: 2
57 INITIAL_PIN_BLOCKED = 0x63D0,
61 )
62
63// According to ISO-7816-4, 5.6 Status bytes, Table 6
82 )
83
85{
86 private:
87 quint16 mStatusCode;
89
90 public:
92 explicit ResponseApdu(const QByteArray& pBuffer = QByteArray());
93
94 [[nodiscard]] bool isEmpty() const;
95 [[nodiscard]] const QByteArray& getData() const;
96 [[nodiscard]] StatusCode getStatusCode() const;
98 [[nodiscard]] SW1 getSW1() const;
99 [[nodiscard]] char getSW2() const;
100
101 operator QByteArray() const;
102};
103
104
109
110
112
113
119
120#ifndef QT_NO_DEBUG
122{
123 return QByteArray(pLeft) == QByteArray(pRight);
124}
125
126
128{
129 return pLeft.mReturnCode == pRight.mReturnCode && pLeft.mResponseApdu == pRight.mResponseApdu;
130}
131
132
133#endif
134
135} // namespace governikus
#define defineTypedEnumType(enumName, enumType,...)
Definition EnumHelper.h:84
struct Data mData
QDebug logApdu(QDebug pDbg, const QByteArray &pApdu)
Definition LogPrivacy.cpp:13
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:17
quint8
Definition ResponseApdu.h:64
UNKNOWN
Definition ResponseApdu.h:65
WRONG_PARAMETERS_P1_P2_NO_INFO
Definition ResponseApdu.h:76
char * toString(const CommandApdu &pCommandApdu)
WRONG_LENGTH
Definition ResponseApdu.h:72
MORE_DATA_AVAILABLE
Definition ResponseApdu.h:66
WRONG_PARAMETERS_P1_P2
Definition ResponseApdu.h:75
FUNCTIONS_IN_CLASS_NOT_SUPPORTED
Definition ResponseApdu.h:73
NONVOLATILE_MEMORY_CHANGED_2
Definition ResponseApdu.h:70
SECURITY_ISSUE
Definition ResponseApdu.h:71
WRONG_LE_FIELD
Definition ResponseApdu.h:77
NONVOLATILE_MEMORY_UNCHANGED_1
Definition ResponseApdu.h:67
ERROR_COMMAND_NOT_ALLOWED
Definition ResponseApdu.h:74
QSharedPointer< T > decodeObject(const QByteArray &pData, bool pLogging=true)
Template function for decoding an OpenSSL type from DER encoded QByteArray.
Definition ASN1TemplateUtil.h:114
INSTRUCTION_CODE_INVALID
Definition ResponseApdu.h:78
QDebug operator<<(QDebug pDbg, const CommandApdu &pCommandApdu)
Definition CommandApdu.h:96
NO_PRECISE_DIAGNOSIS
Definition ResponseApdu.h:80
NONVOLATILE_MEMORY_UNCHANGED_2
Definition ResponseApdu.h:69
NONVOLATILE_MEMORY_CHANGED_1
Definition ResponseApdu.h:68
CLASS_NOT_SUPPORTED
Definition ResponseApdu.h:79
bool operator==(const CommandApdu &pLeft, const CommandApdu &pRight)
Definition CommandApdu.h:105
SUCCESS
Definition ResponseApdu.h:81
Definition ResponseApdu.h:115
CardReturnCode mReturnCode
Definition ResponseApdu.h:116
ResponseApdu mResponseApdu
Definition ResponseApdu.h:117