15#include <QSharedPointer>
16#include <QSslPreSharedKeyAuthenticator>
19class test_StateGenericSendReceive;
29 friend class ::test_StateGenericSendReceive;
32 const PaosType mExpectedResponseType;
33 const QList<PaosType> mOtherResponseTypes;
34 const bool mPersonalization;
35 QSharedPointer<QNetworkReply> mReply;
37 void logRawData(
const QByteArray& pMessage);
38 void setReceivedMessage(
const QSharedPointer<PaosMessage>& pMessage)
const;
39 std::optional<FailureCode> checkSslConnectionAndSaveCertificate(
const QSslConfiguration& pSslConfiguration);
40 void onSslErrors(
const QList<QSslError>& pErrors);
41 void onSslHandshakeDone();
46 const QSharedPointer<WorkflowContext>& pContext,
47 PaosType pExpectedResponseType,
48 const QList<PaosType>& pOtherResponseTypes = {},
49 bool pPersonalization =
false);
56 void onReplyFinished();
57 void onPreSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator* pAuthenticator)
const;
60 void onExit(QEvent* pEvent)
override;
66class StateSendStartPaos
73 explicit StateSendStartPaos(
const QSharedPointer<WorkflowContext>& pContext)
75 PaosType::INITIALIZE_FRAMEWORK,
77 PaosType::DID_AUTHENTICATE_EAC1
85 return QSharedPointer<ResponseType>();
97 if (pResponseType == PaosType::DID_AUTHENTICATE_EAC1)
109class StateSendInitializeFrameworkResponse
116 explicit StateSendInitializeFrameworkResponse(
const QSharedPointer<WorkflowContext>& pContext)
118 PaosType::DID_AUTHENTICATE_EAC1)
125 return getContext()->getInitializeFrameworkResponse();
131 return getContext()->getInitializeFrameworkResponse();
137class StateSendDIDAuthenticateResponseEAC1
144 explicit StateSendDIDAuthenticateResponseEAC1(
const QSharedPointer<WorkflowContext>& pContext)
146 PaosType::DID_AUTHENTICATE_EAC2)
154 return getContext()->getDidAuthenticateResponseEac1();
160 return getContext()->getDidAuthenticateResponseEac1();
166class StateSendDIDAuthenticateResponseEACAdditionalInputType
173 explicit StateSendDIDAuthenticateResponseEACAdditionalInputType(
const QSharedPointer<WorkflowContext>& pContext)
175 PaosType::DID_AUTHENTICATE_EAC_ADDITIONAL_INPUT_TYPE)
183 return getContext()->getDidAuthenticateResponseEacAdditionalInputType();
189 return getContext()->getDidAuthenticateResponseEacAdditionalInputType();
195class StateSendDIDAuthenticateResponseEAC2
202 explicit StateSendDIDAuthenticateResponseEAC2(
const QSharedPointer<WorkflowContext>& pContext)
212 return getContext()->getDidAuthenticateResponseEac2();
218 return getContext()->getDidAuthenticateResponseEac2();
224class StateSendTransmitResponse
231 explicit StateSendTransmitResponse(
const QSharedPointer<WorkflowContext>& pContext)
void setAbortOnCardRemoved()
Definition AbstractState.cpp:34
AbstractState(const QSharedPointer< WorkflowContext > &pContext)
Definition AbstractState.cpp:22
QSharedPointer< AuthContext > getContext() const
Definition GenericContextContainer.h:34
GenericContextContainer(const QSharedPointer< WorkflowContext > &pContext)
Definition GenericContextContainer.h:27
virtual void emitStateMachineSignal(PaosType pResponseType)
Definition StateGenericSendReceive.cpp:36
void fireReceivedStartPaosResponse()
StateGenericSendReceive(const QSharedPointer< WorkflowContext > &pContext, PaosType pExpectedResponseType, const QList< PaosType > &pOtherResponseTypes={}, bool pPersonalization=false)
Definition StateGenericSendReceive.cpp:21
virtual QSharedPointer< PaosCreator > getAsCreator()=0
virtual QSharedPointer< ResponseType > getAsResponse()=0
void onExit(QEvent *pEvent) override
Definition StateGenericSendReceive.cpp:184
friend class StateBuilder
Definition StateGenericSendReceive.h:141
QSharedPointer< ResponseType > getAsResponse() override
Definition StateGenericSendReceive.h:152
QSharedPointer< PaosCreator > getAsCreator() override
Definition StateGenericSendReceive.h:158
friend class StateBuilder
Definition StateGenericSendReceive.h:199
QSharedPointer< ResponseType > getAsResponse() override
Definition StateGenericSendReceive.h:210
QSharedPointer< PaosCreator > getAsCreator() override
Definition StateGenericSendReceive.h:216
friend class StateBuilder
Definition StateGenericSendReceive.h:113
QSharedPointer< ResponseType > getAsResponse() override
Definition StateGenericSendReceive.h:123
QSharedPointer< PaosCreator > getAsCreator() override
Definition StateGenericSendReceive.h:129
QSharedPointer< PaosCreator > getAsCreator() override
Definition StateGenericSendReceive.h:89
friend class StateBuilder
Definition StateGenericSendReceive.h:70
void emitStateMachineSignal(PaosType pResponseType) override
Definition StateGenericSendReceive.h:95
void fireReceivedExtractCvcsFromEac1InputType()
QSharedPointer< ResponseType > getAsResponse() override
Definition StateGenericSendReceive.h:83
friend class StateBuilder
Definition StateGenericSendReceive.h:228
QSharedPointer< ResponseType > getAsResponse() override
Definition StateGenericSendReceive.h:239
QSharedPointer< PaosCreator > getAsCreator() override
Definition StateGenericSendReceive.h:245
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:17