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);
const QSharedPointer< StartPaosResponse > & getStartPaosResponse() const
Definition: AuthContext.h:375
const QSharedPointer< const TcToken > & getTcToken() const
Definition: AuthContext.h:194
const QSharedPointer< Disconnect > & getDisconnect() const
Definition: AuthContext.h:351
const QSharedPointer< InitializeFramework > & getInitializeFramework() const
Definition: AuthContext.h:327
const QString getProgressMessage() const
Definition: AuthContext.h:123
const QSharedPointer< DisconnectResponse > & getDisconnectResponse()
Definition: AuthContext.h:363
bool hasChainForCertificationAuthority(const EstablishPaceChannelOutput &pPaceOutput) const
Definition: AuthContext.cpp:309
void setReceivedMessageId(const QString &pReceivedMessageId)
Definition: AuthContext.h:212
void setTcToken(const QSharedPointer< const TcToken > &pTcToken)
Definition: AuthContext.h:200
const QSharedPointer< const CVCertificate > & getTerminalCvc() const
Definition: AuthContext.h:491
void setDidList(const QSharedPointer< DIDList > &pDidList)
Definition: AuthContext.h:309
Definition: AuthContext.h:46
int getProgressValue() const
Definition: AuthContext.h:117
void setStartPaos(const QSharedPointer< StartPaos > &pStartPaos)
Definition: AuthContext.h:461
const QSet< AccessRight > getEffectiveAccessRights() const
Definition: AuthContext.h:427
const QVector< QSharedPointer< Transmit > > & getTransmits()
Definition: AuthContext.h:400
void setDisconnectResponse(const QSharedPointer< DisconnectResponse > &pDisconnectResponse)
Definition: AuthContext.h:369
Definition: CVCertificateChainBuilder.h:18
bool addEffectiveAccessRight(AccessRight pAccessRight)
Definition: AuthContext.cpp:184
const QSharedPointer< DIDAuthenticateEAC1 > & getDidAuthenticateEac1() const
Definition: AuthContext.h:230
void addTransmit(const QSharedPointer< Transmit > &pTransmit)
Definition: AuthContext.h:406
void initCvcChainBuilder(const QVector< QSharedPointer< const CVCertificate >> &pAdditionalCertificates=QVector< QSharedPointer< const CVCertificate >>())
Definition: AuthContext.cpp:327
const QSharedPointer< DIDListResponse > & getDidListResponse()
Definition: AuthContext.h:315
void setDidAuthenticateEac2(const QSharedPointer< DIDAuthenticateEAC2 > &pDidAuthenticateEac2)
Definition: AuthContext.h:249
const QSet< AccessRight > & getRequiredAccessRights() const
Definition: AuthContext.h:421
void fireAuthenticationDataChanged()
AuthContext(const QSharedPointer< ActivationContext > &pActivationContext)
Definition: AuthContext.cpp:17
void setDvCvc(const QSharedPointer< const CVCertificate > &dvCvc)
Definition: AuthContext.h:485
void setSkipRedirect(bool pSkipRedirect)
Definition: AuthContext.h:150
CVCertificateChain getChainForCertificationAuthority(const EstablishPaceChannelOutput &pPaceOutput) const
Definition: AuthContext.cpp:315
void setInitializeFrameworkResponse(const QSharedPointer< InitializeFrameworkResponse > &pInitializeFrameworkResponse)
Definition: AuthContext.h:345
void setTcTokenUrl(const QUrl &pTcTokenUrl)
Definition: AuthContext.h:188
const QUrl & getRefreshUrl() const
Definition: AuthContext.h:218
void setStartPaosResponse(const QSharedPointer< StartPaosResponse > &pStartPaosResponse)
Definition: AuthContext.h:381
Definition: CVCertificateChain.h:20
void setRefreshUrl(const QUrl &pRefreshUrl)
Definition: AuthContext.h:224
void addCertificateData(const QUrl &pUrl, const QSslCertificate &pCert)
Definition: AuthContext.h:168
static QUrl getUrlOrigin(const QUrl &pUrl)
Determines the URL origin, i.e.
Definition: UrlUtil.cpp:19
const QUrl & getTcTokenUrl() const
Definition: AuthContext.h:182
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:14
void setSslSession(const QByteArray &pSession)
Definition: AuthContext.cpp:263
bool isTcTokenNotFound() const
Definition: AuthContext.h:132
QString getRequiredAge() const
Definition: AuthContext.cpp:342
void setDidAuthenticateResponseEacAdditionalInputType(const QSharedPointer< DIDAuthenticateResponseEAC2 > &pDidAuthenticateResponseEacAdditionalInputType)
Definition: AuthContext.h:273
void fireDidAuthenticateEac1Changed()
const QSharedPointer< DIDAuthenticateResponseEAC2 > & getDidAuthenticateResponseEac2() const
Definition: AuthContext.h:291
const QSharedPointer< DIDAuthenticateResponseEAC2 > & getDidAuthenticateResponseEacAdditionalInputType() const
Definition: AuthContext.h:267
void setDidAuthenticateEac1(const QSharedPointer< DIDAuthenticateEAC1 > &pDIDAuthenticateEAC1)
Definition: AuthContext.h:236
Definition: WorkflowContext.h:21
void setDidListResponse(const QSharedPointer< DIDListResponse > &pDidListResponse)
Definition: AuthContext.h:321
bool isSkipRedirect() const
Definition: AuthContext.h:144
const QString & getReceivedMessageId() const
Definition: AuthContext.h:206
const QSharedPointer< InitializeFrameworkResponse > & getInitializeFrameworkResponse() const
Definition: AuthContext.h:339
void setErrorReportedToServer(bool pErrorReportedToServer)
Definition: AuthContext.h:111
void setTerminalCvc(const QSharedPointer< const CVCertificate > &pTerminalCvc)
Definition: AuthContext.cpp:243
bool removeEffectiveAccessRight(AccessRight pAccessRight)
Definition: AuthContext.cpp:202
void setDidAuthenticateResponseEac2(const QSharedPointer< DIDAuthenticateResponseEAC2 > &pDidAuthenticateResponseEac2)
Definition: AuthContext.h:297
bool containsCertificateFor(const QUrl &pUrl) const
Definition: AuthContext.h:162
const QSharedPointer< const CVCertificate > & getDvCvc() const
Definition: AuthContext.h:479
const QSharedPointer< DIDAuthenticateResponseEAC1 > & getDidAuthenticateResponseEac1() const
Definition: AuthContext.h:255
void setDidAuthenticateResponseEac1(const QSharedPointer< DIDAuthenticateResponseEAC1 > &pDidAuthenticateResponseEac1)
Definition: AuthContext.h:261
void fireProgressChanged()
QByteArray encodeEffectiveChat()
Definition: AuthContext.cpp:269
const QSet< AccessRight > & getOptionalAccessRights() const
Definition: AuthContext.h:415
QList< QSslCertificate > getCertificateList() const
Definition: AuthContext.h:156
void setProgress(int pValue, const QString &pMessage)
Definition: AuthContext.cpp:59
const QVector< QSharedPointer< TransmitResponse > > & getTransmitResponses()
Definition: AuthContext.h:387
void setInitializeFramework(const QSharedPointer< InitializeFramework > &pInitializeFramework)
Definition: AuthContext.h:333
Definition: EstablishPaceChannelOutput.h:47
void setDisconnect(const QSharedPointer< Disconnect > &pDisconnect)
Definition: AuthContext.h:357
const QSharedPointer< DIDAuthenticateEACAdditional > & getDidAuthenticateEacAdditional() const
Definition: AuthContext.h:279
bool isErrorReportedToServer() const
Definition: AuthContext.h:105
void setTcTokenNotFound(bool pTcTokenNotFound)
Definition: AuthContext.h:138
void fireEffectiveChatChanged()
CVCertificateChain getChainStartingWith(const QSharedPointer< const CVCertificate > &pChainRoot) const
Definition: AuthContext.cpp:289
const QSharedPointer< DIDAuthenticateEAC2 > & getDidAuthenticateEac2() const
Definition: AuthContext.h:243
const QSharedPointer< DIDList > & getDidList() const
Definition: AuthContext.h:303
void addTransmitResponse(const QSharedPointer< TransmitResponse > &pTransmitResponse)
Definition: AuthContext.h:393
ActivationContext * getActivationContext() const
Definition: AuthContext.h:176
Definition: ActivationContext.h:17
const QByteArray & getSslSession() const
Definition: AuthContext.cpp:257
void setDidAuthenticateEacAdditional(const QSharedPointer< DIDAuthenticateEACAdditional > &pDidAuthenticateEacAdditionalInputType)
Definition: AuthContext.h:285
bool setEffectiveAccessRights(const QSet< AccessRight > &pAccessRights)
Definition: AuthContext.cpp:219
const QSharedPointer< StartPaos > & getStartPaos() const
Definition: AuthContext.h:455