AusweisApp
Lade ...
Suche ...
Keine Treffer
GeneralAuthenticateResponse.h
gehe zur Dokumentation dieser Datei
1
9#pragma once
10
11#include "ResponseApdu.h"
13
14
15namespace governikus
16{
17
19{
20 private:
21 ResponseApdu mResponseApdu;
22
23 protected:
24 [[nodiscard]] bool isValid() const;
25 [[nodiscard]] QByteArray getResponseData() const;
26
27 public:
28 explicit GAResponseApdu(const ResponseApdu& pResponseApdu);
29 [[nodiscard]] bool isEmpty() const;
30 [[nodiscard]] SW1 getSW1() const;
31 [[nodiscard]] int getRetryCounter() const;
32};
33
34
41using GA_ENCRYPTEDNONCEDATA = struct ga_encryptednoncedata_st
42{
43 ASN1_OCTET_STRING* mEncryptedNonce;
44};
46
47
49 : public GAResponseApdu
50{
51 private:
52 void parseDynamicAuthenticationData();
53 QByteArray mEncryptedNonce;
54
55 public:
56 explicit GAEncryptedNonceResponse(const ResponseApdu& pResponseApdu);
57 [[nodiscard]] const QByteArray& getEncryptedNonce() const;
58};
59
60
67using GA_MAPNONCEDATA = struct ga_mapnoncedata_st
68{
69 ASN1_OCTET_STRING* mMappingData;
70};
72
73
75 : public GAResponseApdu
76{
77 private:
78 void parseDynamicAuthenticationData();
79 QByteArray mMappingData;
80
81 public:
82 explicit GAMapNonceResponse(const ResponseApdu& pResponseApdu);
83 [[nodiscard]] const QByteArray& getMappingData() const;
84};
85
86
93using GA_PERFORMKEYAGREEMENTDATA = struct ga_performkeyagreementdata_st
94{
95 ASN1_OCTET_STRING* mEphemeralPublicKey;
96};
98
99
101 : public GAResponseApdu
102{
103 private:
104 void parseDynamicAuthenticationData();
105 QByteArray mEphemeralPublicKey;
106
107 public:
108 explicit GAPerformKeyAgreementResponse(const ResponseApdu& pResponseApdu);
109 [[nodiscard]] const QByteArray& getEphemeralPublicKey() const;
110};
111
112
121using GA_MUTUALAUTHENTICATIONDATA = struct ga_mutualauthenticationdata_st
122{
123 ASN1_OCTET_STRING* mAuthenticationToken;
124 ASN1_OCTET_STRING* mCarCurr;
125 ASN1_OCTET_STRING* mCarPrev;
126};
128
129
131 : public GAResponseApdu
132{
133 private:
134 void parseDynamicAuthenticationData();
135 QByteArray mAuthenticationToken;
136 QByteArray mCarCurr;
137 QByteArray mCarPrev;
138
139 public:
140 explicit GAMutualAuthenticationResponse(const ResponseApdu& pResponseApdu);
141 [[nodiscard]] const QByteArray& getAuthenticationToken() const;
142 [[nodiscard]] const QByteArray& getCarCurr() const;
143 [[nodiscard]] const QByteArray& getCarPrev() const;
144};
145
146
154using GA_CHIPAUTHENTICATIONDATA = struct ga_chipauthenticationdata_st
155{
156 ASN1_OCTET_STRING* mNonce;
157 ASN1_OCTET_STRING* mAuthenticationToken;
158};
160
161
163 : public GAResponseApdu
164{
165 private:
166 void parseDynamicAuthenticationData();
167 QByteArray mNonce;
168 QByteArray mAuthenticationToken;
169
170 public:
171 explicit GAChipAuthenticationResponse(const ResponseApdu& pResponseApdu);
172 [[nodiscard]] const QByteArray& getNonce() const;
173 [[nodiscard]] const QByteArray& getAuthenticationToken() const;
174};
175
176
177} // namespace governikus
#define DECLARE_ASN1_OBJECT(name)
Definition ASN1TemplateUtil.h:177
Definition GeneralAuthenticateResponse.h:164
Definition GeneralAuthenticateResponse.h:50
Definition GeneralAuthenticateResponse.h:76
Definition GeneralAuthenticateResponse.h:132
Definition GeneralAuthenticateResponse.h:102
Definition GeneralAuthenticateResponse.h:19
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
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:17
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:43
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:156
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:123
ASN1_OCTET_STRING * mCarCurr
Definition GeneralAuthenticateResponse.h:124
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:95
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:69
ASN1_OCTET_STRING * mCarPrev
Definition GeneralAuthenticateResponse.h:125
ASN1_OCTET_STRING * mAuthenticationToken
Definition GeneralAuthenticateResponse.h:157