AusweisApp
 
Lade ...
Suche ...
Keine Treffer
GeneralAuthenticateResponse.h
gehe zur Dokumentation dieser Datei
1
4
5#pragma once
6
7#include "ResponseApdu.h"
9
10
11namespace governikus
12{
13
15{
16 private:
17 ResponseApdu mResponseApdu;
18
19 protected:
20 [[nodiscard]] bool isValid() const;
21 [[nodiscard]] QByteArray getResponseData() const;
22
23 public:
24 explicit GAResponseApdu(const ResponseApdu& pResponseApdu);
25 [[nodiscard]] bool isEmpty() const;
26 [[nodiscard]] SW1 getSW1() const;
27 [[nodiscard]] int getRetryCounter() const;
28};
29
30
37using GA_ENCRYPTEDNONCEDATA = struct ga_encryptednoncedata_st
38{
39 ASN1_OCTET_STRING* mEncryptedNonce;
40};
42
43
45 : public GAResponseApdu
46{
47 private:
48 void parseDynamicAuthenticationData();
49 QByteArray mEncryptedNonce;
50
51 public:
52 explicit GAEncryptedNonceResponse(const ResponseApdu& pResponseApdu);
53 [[nodiscard]] const QByteArray& getEncryptedNonce() const;
54};
55
56
63using GA_MAPNONCEDATA = struct ga_mapnoncedata_st
64{
65 ASN1_OCTET_STRING* mMappingData;
66};
68
69
71 : public GAResponseApdu
72{
73 private:
74 void parseDynamicAuthenticationData();
75 QByteArray mMappingData;
76
77 public:
78 explicit GAMapNonceResponse(const ResponseApdu& pResponseApdu);
79 [[nodiscard]] const QByteArray& getMappingData() const;
80};
81
82
89using GA_PERFORMKEYAGREEMENTDATA = struct ga_performkeyagreementdata_st
90{
91 ASN1_OCTET_STRING* mEphemeralPublicKey;
92};
94
95
97 : public GAResponseApdu
98{
99 private:
100 void parseDynamicAuthenticationData();
101 QByteArray mEphemeralPublicKey;
102
103 public:
104 explicit GAPerformKeyAgreementResponse(const ResponseApdu& pResponseApdu);
105 [[nodiscard]] const QByteArray& getEphemeralPublicKey() const;
106};
107
108
117using GA_MUTUALAUTHENTICATIONDATA = struct ga_mutualauthenticationdata_st
118{
119 ASN1_OCTET_STRING* mAuthenticationToken;
120 ASN1_OCTET_STRING* mCarCurr;
121 ASN1_OCTET_STRING* mCarPrev;
122};
124
125
127 : public GAResponseApdu
128{
129 private:
130 void parseDynamicAuthenticationData();
131 QByteArray mAuthenticationToken;
132 QByteArray mCarCurr;
133 QByteArray mCarPrev;
134
135 public:
136 explicit GAMutualAuthenticationResponse(const ResponseApdu& pResponseApdu);
137 [[nodiscard]] const QByteArray& getAuthenticationToken() const;
138 [[nodiscard]] const QByteArray& getCarCurr() const;
139 [[nodiscard]] const QByteArray& getCarPrev() const;
140};
141
142
150using GA_CHIPAUTHENTICATIONDATA = struct ga_chipauthenticationdata_st
151{
152 ASN1_OCTET_STRING* mNonce;
153 ASN1_OCTET_STRING* mAuthenticationToken;
154};
156
157
159 : public GAResponseApdu
160{
161 private:
162 void parseDynamicAuthenticationData();
163 QByteArray mNonce;
164 QByteArray mAuthenticationToken;
165
166 public:
167 explicit GAChipAuthenticationResponse(const ResponseApdu& pResponseApdu);
168 [[nodiscard]] const QByteArray& getNonce() const;
169 [[nodiscard]] const QByteArray& getAuthenticationToken() const;
170};
171
172
173} // namespace governikus
#define DECLARE_ASN1_OBJECT(name)
Definition ASN1TemplateUtil.h:175
GAChipAuthenticationResponse(const ResponseApdu &pResponseApdu)
Definition GeneralAuthenticateResponse.cpp:309
const QByteArray & getAuthenticationToken() const
Definition GeneralAuthenticateResponse.cpp:327
const QByteArray & getNonce() const
Definition GeneralAuthenticateResponse.cpp:321
const QByteArray & getEncryptedNonce() const
Definition GeneralAuthenticateResponse.cpp:100
GAEncryptedNonceResponse(const ResponseApdu &pResponseApdu)
Definition GeneralAuthenticateResponse.cpp:89
const QByteArray & getMappingData() const
Definition GeneralAuthenticateResponse.cpp:149
GAMapNonceResponse(const ResponseApdu &pResponseApdu)
Definition GeneralAuthenticateResponse.cpp:138
GAMutualAuthenticationResponse(const ResponseApdu &pResponseApdu)
Definition GeneralAuthenticateResponse.cpp:243
const QByteArray & getCarPrev() const
Definition GeneralAuthenticateResponse.cpp:268
const QByteArray & getCarCurr() const
Definition GeneralAuthenticateResponse.cpp:262
const QByteArray & getAuthenticationToken() const
Definition GeneralAuthenticateResponse.cpp:256
GAPerformKeyAgreementResponse(const ResponseApdu &pResponseApdu)
Definition GeneralAuthenticateResponse.cpp:187
const QByteArray & getEphemeralPublicKey() const
Definition GeneralAuthenticateResponse.cpp:198
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
GAResponseApdu(const ResponseApdu &pResponseApdu)
Definition GeneralAuthenticateResponse.cpp:17
QByteArray getResponseData() const
Definition GeneralAuthenticateResponse.cpp:33
Defines the AccessRight and AccessRole enum.
Definition CommandApdu.h:17
struct 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:89
struct 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:63
struct ga_mutualauthenticationdata_st { ASN1_OCTET_STRING *mAuthenticationToken; ASN1_OCTET_STRING *mCarCurr; ASN1_OCTET_STRING *mCarPrev;} GA_MUTUALAUTHENTICATIONDATA
According to TR-03110-3 the ASN.1 the response APDU has three protocol specific data:
Definition GeneralAuthenticateResponse.h:117
struct 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:37
struct ga_chipauthenticationdata_st { ASN1_OCTET_STRING *mNonce; ASN1_OCTET_STRING *mAuthenticationToken;} GA_CHIPAUTHENTICATIONDATA
According to TR-03110-3 the ASN.1 the response APDU has three protocol specific data:
Definition GeneralAuthenticateResponse.h:150