gehe zur Dokumentation dieser Datei
34 #include <QSharedPointer>
35 #include <QSslCertificate>
38 class test_StateRedirectBrowser;
40 class test_StatePreVerification;
41 class test_StateCertificateDescriptionCheck;
52 friend class ::test_StateRedirectBrowser;
53 friend class ::test_StatePreVerification;
54 friend class ::test_StateProcessCertificatesFromEac2;
55 friend class ::test_StateCertificateDescriptionCheck;
56 friend class ::test_ChatModel;
59 QString mProgressMessage;
60 bool mTcTokenNotFound;
61 bool mErrorReportedToServer;
64 QSharedPointer<ActivationContext> mActivationContext;
66 QSharedPointer<const TcToken> mTcToken;
68 QString mReceivedMessageId;
69 QSharedPointer<StartPaos> mStartPaos;
70 QSharedPointer<InitializeFramework> mInitializeFramework;
71 QSharedPointer<InitializeFrameworkResponse> mInitializeFrameworkResponse;
72 QSharedPointer<DIDList> mDIDList;
73 QSharedPointer<DIDListResponse> mDIDListResponse;
74 QSharedPointer<DIDAuthenticateEAC1> mDIDAuthenticateEAC1;
75 QSharedPointer<DIDAuthenticateResponseEAC1> mDIDAuthenticateResponseEAC1;
76 QSharedPointer<DIDAuthenticateEAC2> mDIDAuthenticateEAC2;
77 QSharedPointer<DIDAuthenticateResponseEAC2> mDIDAuthenticateResponseEACAdditionalInputType;
78 QSharedPointer<DIDAuthenticateEACAdditional> mDIDAuthenticateEACAdditionalInputType;
79 QSharedPointer<DIDAuthenticateResponseEAC2> mDIDAuthenticateResponseEAC2;
80 QVector<QSharedPointer<Transmit>> mTransmits;
81 QVector<QSharedPointer<TransmitResponse>> mTransmitResponses;
82 QSharedPointer<Disconnect> mDisconnect;
83 QSharedPointer<DisconnectResponse> mDisconnectResponse;
84 QSharedPointer<StartPaosResponse> mStartPaosResponse;
85 QSet<AccessRight> mEffectiveAccessRights;
86 QSet<AccessRight> mRequiredAccessRights;
87 QSet<AccessRight> mOptionalAccessRights;
88 QMultiMap<QUrl, QSslCertificate> mCertificates;
89 QSharedPointer<const CVCertificate> mTerminalCvc, mDvCvc;
91 QByteArray mSslSession;
93 void initializeChat();
94 bool removeForbiddenAccessRights(QSet<AccessRight>& pSet);
103 explicit AuthContext(
const QSharedPointer<ActivationContext>& pActivationContext);
107 return mErrorReportedToServer;
113 mErrorReportedToServer = pErrorReportedToServer;
119 return mProgressValue;
125 return mProgressMessage;
129 void setProgress(
int pValue,
const QString& pMessage);
134 return mTcTokenNotFound;
140 mTcTokenNotFound = pTcTokenNotFound;
146 return mSkipRedirect;
152 mSkipRedirect = pSkipRedirect;
158 return mCertificates.values();
171 qDebug() <<
"Adding certificate CN=" << pCert.subjectInfo(QSslCertificate::CommonName) <<
"SN=" << pCert.serialNumber() <<
"for URL origin" << originUrl;
172 mCertificates.insert(originUrl, pCert);
178 return mActivationContext.data();
190 mTcTokenUrl = pTcTokenUrl;
200 void setTcToken(
const QSharedPointer<const TcToken>& pTcToken)
208 return mReceivedMessageId;
214 mReceivedMessageId = pReceivedMessageId;
226 mRefreshUrl = pRefreshUrl;
232 return mDIDAuthenticateEAC1;
238 mDIDAuthenticateEAC1 = pDIDAuthenticateEAC1;
245 return mDIDAuthenticateEAC2;
251 mDIDAuthenticateEAC2 = pDidAuthenticateEac2;
257 return mDIDAuthenticateResponseEAC1;
263 mDIDAuthenticateResponseEAC1 = pDidAuthenticateResponseEac1;
269 return mDIDAuthenticateResponseEACAdditionalInputType;
275 mDIDAuthenticateResponseEACAdditionalInputType = pDidAuthenticateResponseEacAdditionalInputType;
281 return mDIDAuthenticateEACAdditionalInputType;
287 mDIDAuthenticateEACAdditionalInputType = pDidAuthenticateEacAdditionalInputType;
293 return mDIDAuthenticateResponseEAC2;
299 mDIDAuthenticateResponseEAC2 = pDidAuthenticateResponseEac2;
317 return mDIDListResponse;
323 mDIDListResponse = pDidListResponse;
329 return mInitializeFramework;
335 mInitializeFramework = pInitializeFramework;
341 return mInitializeFrameworkResponse;
347 mInitializeFrameworkResponse = pInitializeFrameworkResponse;
359 mDisconnect = pDisconnect;
365 return mDisconnectResponse;
371 mDisconnectResponse = pDisconnectResponse;
377 return mStartPaosResponse;
383 mStartPaosResponse = pStartPaosResponse;
389 return mTransmitResponses;
395 Q_ASSERT(!pTransmitResponse.isNull());
396 mTransmitResponses += pTransmitResponse;
408 Q_ASSERT(!pTransmit.isNull());
409 mTransmits += pTransmit;
417 return mOptionalAccessRights;
423 return mRequiredAccessRights;
429 return mEffectiveAccessRights;
463 mStartPaos = pStartPaos;
476 void initCvcChainBuilder(
const QVector<QSharedPointer<const CVCertificate>>& pAdditionalCertificates = QVector<QSharedPointer<const CVCertificate>>());
479 const QSharedPointer<const CVCertificate>&
getDvCvc()
const
485 void setDvCvc(
const QSharedPointer<const CVCertificate>& dvCvc)
497 void setTerminalCvc(
const QSharedPointer<const CVCertificate>& pTerminalCvc);
ActivationContext * getActivationContext() const
Definition: AuthContext.h:176
void setProgress(int pValue, const QString &pMessage)
Definition: AuthContext.cpp:59
const QSharedPointer< StartPaosResponse > & getStartPaosResponse() const
Definition: AuthContext.h:375
void addTransmit(const QSharedPointer< Transmit > &pTransmit)
Definition: AuthContext.h:406
const QVector< QSharedPointer< TransmitResponse > > & getTransmitResponses()
Definition: AuthContext.h:387
const QSharedPointer< DIDAuthenticateResponseEAC1 > & getDidAuthenticateResponseEac1() const
Definition: AuthContext.h:255
void setStartPaos(const QSharedPointer< StartPaos > &pStartPaos)
Definition: AuthContext.h:461
const QSharedPointer< const CVCertificate > & getDvCvc() const
Definition: AuthContext.h:479
const QByteArray & getSslSession() const
Definition: AuthContext.cpp:257
Definition: CVCertificateChainBuilder.h:20
void setInitializeFrameworkResponse(const QSharedPointer< InitializeFrameworkResponse > &pInitializeFrameworkResponse)
Definition: AuthContext.h:345
bool isErrorReportedToServer() const
Definition: AuthContext.h:105
bool hasChainForCertificationAuthority(const EstablishPaceChannelOutput &pPaceOutput) const
Definition: AuthContext.cpp:309
const QSharedPointer< DIDAuthenticateResponseEAC2 > & getDidAuthenticateResponseEacAdditionalInputType() const
Definition: AuthContext.h:267
const QSharedPointer< const TcToken > & getTcToken() const
Definition: AuthContext.h:194
const QSharedPointer< StartPaos > & getStartPaos() const
Definition: AuthContext.h:455
void setSslSession(const QByteArray &pSession)
Definition: AuthContext.cpp:263
int getProgressValue() const
Definition: AuthContext.h:117
Definition: AuthContext.h:48
bool addEffectiveAccessRight(AccessRight pAccessRight)
Definition: AuthContext.cpp:184
void setDisconnect(const QSharedPointer< Disconnect > &pDisconnect)
Definition: AuthContext.h:357
void setTcTokenUrl(const QUrl &pTcTokenUrl)
Definition: AuthContext.h:188
void fireProgressChanged()
void setDidAuthenticateEac2(const QSharedPointer< DIDAuthenticateEAC2 > &pDidAuthenticateEac2)
Definition: AuthContext.h:249
const QSet< AccessRight > & getRequiredAccessRights() const
Definition: AuthContext.h:421
void initCvcChainBuilder(const QVector< QSharedPointer< const CVCertificate >> &pAdditionalCertificates=QVector< QSharedPointer< const CVCertificate >>())
Definition: AuthContext.cpp:327
QString getRequiredAge() const
Definition: AuthContext.cpp:342
bool containsCertificateFor(const QUrl &pUrl) const
Definition: AuthContext.h:162
void setStartPaosResponse(const QSharedPointer< StartPaosResponse > &pStartPaosResponse)
Definition: AuthContext.h:381
void setDidListResponse(const QSharedPointer< DIDListResponse > &pDidListResponse)
Definition: AuthContext.h:321
const QUrl & getRefreshUrl() const
Definition: AuthContext.h:218
bool isCanAllowedMode() const
Definition: WorkflowContext.cpp:412
CVCertificateChain getChainForCertificationAuthority(const EstablishPaceChannelOutput &pPaceOutput) const
Definition: AuthContext.cpp:315
void setSkipRedirect(bool pSkipRedirect)
Definition: AuthContext.h:150
void fireDidAuthenticateEac1Changed()
bool setEffectiveAccessRights(const QSet< AccessRight > &pAccessRights)
Definition: AuthContext.cpp:219
const QSharedPointer< DisconnectResponse > & getDisconnectResponse()
Definition: AuthContext.h:363
void setCanAllowedMode(bool pCanAllowedMode)
Definition: WorkflowContext.cpp:418
void setDisconnectResponse(const QSharedPointer< DisconnectResponse > &pDisconnectResponse)
Definition: AuthContext.h:369
void setReceivedMessageId(const QString &pReceivedMessageId)
Definition: AuthContext.h:212
Definition: EstablishPaceChannelOutput.h:48
const QSharedPointer< const CVCertificate > & getTerminalCvc() const
Definition: AuthContext.h:491
void setDidAuthenticateEacAdditional(const QSharedPointer< DIDAuthenticateEACAdditional > &pDidAuthenticateEacAdditionalInputType)
Definition: AuthContext.h:285
const QSharedPointer< DIDList > & getDidList() const
Definition: AuthContext.h:303
CVCertificateChain getChainStartingWith(const QSharedPointer< const CVCertificate > &pChainRoot) const
Get a chain with root CVC passed in as parameter.
Definition: CVCertificateChainBuilder.cpp:106
void fireLanguageChanged()
const QSharedPointer< InitializeFrameworkResponse > & getInitializeFrameworkResponse() const
Definition: AuthContext.h:339
const QSharedPointer< DIDAuthenticateEAC2 > & getDidAuthenticateEac2() const
Definition: AuthContext.h:243
CVCertificateChain getChainStartingWith(const QSharedPointer< const CVCertificate > &pChainRoot) const
Definition: AuthContext.cpp:289
static QUrl getUrlOrigin(const QUrl &pUrl)
Determines the URL origin, i.e.
Definition: UrlUtil.cpp:19
void setInitializeFramework(const QSharedPointer< InitializeFramework > &pInitializeFramework)
Definition: AuthContext.h:333
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15
const QString & getReceivedMessageId() const
Definition: AuthContext.h:206
void setErrorReportedToServer(bool pErrorReportedToServer)
Definition: AuthContext.h:111
void fireEffectiveChatChanged()
void addCertificateData(const QUrl &pUrl, const QSslCertificate &pCert)
Definition: AuthContext.h:168
void setDvCvc(const QSharedPointer< const CVCertificate > &dvCvc)
Definition: AuthContext.h:485
const QSet< AccessRight > & getOptionalAccessRights() const
Definition: AuthContext.h:415
const QUrl & getTcTokenUrl() const
Definition: AuthContext.h:182
const QVector< QSharedPointer< Transmit > > & getTransmits()
Definition: AuthContext.h:400
const QSharedPointer< DIDAuthenticateEACAdditional > & getDidAuthenticateEacAdditional() const
Definition: AuthContext.h:279
struct chat_st { ASN1_OBJECT *mType CHAT
According to.
Definition: Chat.h:67
Definition: ActivationContext.h:19
void setDidAuthenticateResponseEac2(const QSharedPointer< DIDAuthenticateResponseEAC2 > &pDidAuthenticateResponseEac2)
Definition: AuthContext.h:297
Definition: WorkflowContext.h:23
const QSharedPointer< CardConnection > & getCardConnection() const
Definition: WorkflowContext.cpp:175
void setTerminalCvc(const QSharedPointer< const CVCertificate > &pTerminalCvc)
Definition: AuthContext.cpp:243
void setTcToken(const QSharedPointer< const TcToken > &pTcToken)
Definition: AuthContext.h:200
bool isTcTokenNotFound() const
Definition: AuthContext.h:132
QByteArray encodeEffectiveChat()
Definition: AuthContext.cpp:269
AuthContext(const QSharedPointer< ActivationContext > &pActivationContext)
Definition: AuthContext.cpp:17
const QString getProgressMessage() const
Definition: AuthContext.h:123
void setDidList(const QSharedPointer< DIDList > &pDidList)
Definition: AuthContext.h:309
void fireAuthenticationDataChanged()
const QSharedPointer< DIDListResponse > & getDidListResponse()
Definition: AuthContext.h:315
bool removeEffectiveAccessRight(AccessRight pAccessRight)
Definition: AuthContext.cpp:202
QList< QSslCertificate > getCertificateList() const
Definition: AuthContext.h:156
void setDidAuthenticateResponseEacAdditionalInputType(const QSharedPointer< DIDAuthenticateResponseEAC2 > &pDidAuthenticateResponseEacAdditionalInputType)
Definition: AuthContext.h:273
void setDidAuthenticateEac1(const QSharedPointer< DIDAuthenticateEAC1 > &pDIDAuthenticateEAC1)
Definition: AuthContext.h:236
const QSharedPointer< Disconnect > & getDisconnect() const
Definition: AuthContext.h:351
void setDidAuthenticateResponseEac1(const QSharedPointer< DIDAuthenticateResponseEAC1 > &pDidAuthenticateResponseEac1)
Definition: AuthContext.h:261
bool isSkipRedirect() const
Definition: AuthContext.h:144
void addTransmitResponse(const QSharedPointer< TransmitResponse > &pTransmitResponse)
Definition: AuthContext.h:393
const QSharedPointer< DIDAuthenticateResponseEAC2 > & getDidAuthenticateResponseEac2() const
Definition: AuthContext.h:291
const QSharedPointer< DIDAuthenticateEAC1 > & getDidAuthenticateEac1() const
Definition: AuthContext.h:230
Definition: CVCertificateChain.h:22
void setRefreshUrl(const QUrl &pRefreshUrl)
Definition: AuthContext.h:224
void setTcTokenNotFound(bool pTcTokenNotFound)
Definition: AuthContext.h:138
bool isValid() const
Is this a valid CVC chain, i.e.
Definition: CVCertificateChain.cpp:42
const QSharedPointer< InitializeFramework > & getInitializeFramework() const
Definition: AuthContext.h:327
const QSet< AccessRight > getEffectiveAccessRights() const
Definition: AuthContext.h:427