AusweisApp2
Lade ...
Suche ...
Keine Treffer
GeneralAuthenticateResponse.h
gehe zur Dokumentation dieser Datei
1
7#pragma once
8
9#include "ResponseApdu.h"
11
12
13namespace governikus
14{
15
17{
18 private:
19 ResponseApdu mResponseApdu;
20
21 protected:
22 [[nodiscard]] bool isValid() const;
23 [[nodiscard]] QByteArray getResponseData() const;
24
25 public:
26 explicit GAResponseApdu(const ResponseApdu& pResponseApdu);
27 [[nodiscard]] bool isEmpty() const;
28 [[nodiscard]] SW1 getSW1() const;
29 [[nodiscard]] int getRetryCounter() const;
30};
31
32
39using GA_ENCRYPTEDNONCEDATA = struct ga_encryptednoncedata_st
40{
41 ASN1_OCTET_STRING* mEncryptedNonce;
42};
44
45
47 : public GAResponseApdu
48{
49 private:
50 void parseDynamicAuthenticationData();
51 QByteArray mEncryptedNonce;
52
53 public:
54 explicit GAEncryptedNonceResponse(const ResponseApdu& pResponseApdu);
55 [[nodiscard]] const QByteArray& getEncryptedNonce() const;
56};
57
58
65using GA_MAPNONCEDATA = struct ga_mapnoncedata_st
66{
67 ASN1_OCTET_STRING* mMappingData;
68};
70
71
73 : public GAResponseApdu
74{
75 private:
76 void parseDynamicAuthenticationData();
77 QByteArray mMappingData;
78
79 public:
80 explicit GAMapNonceResponse(const ResponseApdu& pResponseApdu);
81 [[nodiscard]] const QByteArray& getMappingData() const;
82};
83
84
91using GA_PERFORMKEYAGREEMENTDATA = struct ga_performkeyagreementdata_st
92{
93 ASN1_OCTET_STRING* mEphemeralPublicKey;
94};
96
97
99 : public GAResponseApdu
100{
101 private:
102 void parseDynamicAuthenticationData();
103 QByteArray mEphemeralPublicKey;
104
105 public:
106 explicit GAPerformKeyAgreementResponse(const ResponseApdu& pResponseApdu);
107 [[nodiscard]] const QByteArray& getEphemeralPublicKey() const;
108};
109
110
119using GA_MUTUALAUTHENTICATIONDATA = struct ga_mutualauthenticationdata_st
120{
121 ASN1_OCTET_STRING* mAuthenticationToken;
122 ASN1_OCTET_STRING* mCarCurr;
123 ASN1_OCTET_STRING* mCarPrev;
124};
126
127
129 : public GAResponseApdu
130{
131 private:
132 void parseDynamicAuthenticationData();
133 QByteArray mAuthenticationToken;
134 QByteArray mCarCurr;
135 QByteArray mCarPrev;
136
137 public:
138 explicit GAMutualAuthenticationResponse(const ResponseApdu& pResponseApdu);
139 [[nodiscard]] const QByteArray& getAuthenticationToken() const;
140 [[nodiscard]] const QByteArray& getCarCurr() const;
141 [[nodiscard]] const QByteArray& getCarPrev() const;
142};
143
144
152using GA_CHIPAUTHENTICATIONDATA = struct ga_chipauthenticationdata_st
153{
154 ASN1_OCTET_STRING* mNonce;
155 ASN1_OCTET_STRING* mAuthenticationToken;
156};
158
159
161 : public GAResponseApdu
162{
163 private:
164 void parseDynamicAuthenticationData();
165 QByteArray mNonce;
166 QByteArray mAuthenticationToken;
167
168 public:
169 explicit GAChipAuthenticationResponse(const ResponseApdu& pResponseApdu);
170 [[nodiscard]] const QByteArray& getNonce() const;
171 [[nodiscard]] const QByteArray& getAuthenticationToken() const;
172};
173
174
175} // namespace governikus
#define DECLARE_ASN1_OBJECT(name)
Definition: ASN1TemplateUtil.h:169
Definition: GeneralAuthenticateResponse.h:162
Definition: GeneralAuthenticateResponse.h:48
Definition: GeneralAuthenticateResponse.h:74
Definition: GeneralAuthenticateResponse.h:130
Definition: GeneralAuthenticateResponse.h:100
Definition: GeneralAuthenticateResponse.h:17
int getRetryCounter() const
Definition: GeneralAuthenticateResponse.cpp:51
SW1 getSW1() const
Definition: GeneralAuthenticateResponse.cpp:45
bool isEmpty() const
Definition: GeneralAuthenticateResponse.cpp:39
bool isValid() const
Definition: GeneralAuthenticateResponse.cpp:27
QByteArray getResponseData() const
Definition: GeneralAuthenticateResponse.cpp:33
A simple template renderer.
Definition: ActivationContext.h:15
ga_encryptednoncedata_st { ASN1_OCTET_STRING *mEncryptedNonce GA_ENCRYPTEDNONCEDATA
According to TR-03110-3 the ASN.1 the response APDU has one protocol specific data:
Definition: GeneralAuthenticateResponse.h:41
ga_chipauthenticationdata_st { ASN1_OCTET_STRING *mNonce GA_CHIPAUTHENTICATIONDATA
According to TR-03110-3 the ASN.1 the response APDU has three protocol specific data:
Definition: GeneralAuthenticateResponse.h:154
ga_mutualauthenticationdata_st { ASN1_OCTET_STRING *mAuthenticationToken GA_MUTUALAUTHENTICATIONDATA
According to TR-03110-3 the ASN.1 the response APDU has three protocol specific data:
Definition: GeneralAuthenticateResponse.h:121
ASN1_OCTET_STRING * mCarCurr
Definition: GeneralAuthenticateResponse.h:122
ga_performkeyagreementdata_st { ASN1_OCTET_STRING *mEphemeralPublicKey GA_PERFORMKEYAGREEMENTDATA
According to TR-03110-3 the ASN.1 the response APDU has one protocol specific data:
Definition: GeneralAuthenticateResponse.h:93
ga_mapnoncedata_st { ASN1_OCTET_STRING *mMappingData GA_MAPNONCEDATA
According to TR-03110-3 the ASN.1 the response APDU has one protocol specific data:
Definition: GeneralAuthenticateResponse.h:67
ASN1_OCTET_STRING * mCarPrev
Definition: GeneralAuthenticateResponse.h:123
ASN1_OCTET_STRING * mAuthenticationToken
Definition: GeneralAuthenticateResponse.h:155