AusweisApp2
Lade ...
Suche ...
Keine Treffer
StateCheckRefreshAddress.h
gehe zur Dokumentation dieser Datei
1
8#pragma once
9
10#include "AbstractState.h"
12#include "context/AuthContext.h"
13
14#include <QNetworkReply>
15#include <QSharedPointer>
16#include <QSslCertificate>
17#include <QSslError>
18#include <QSslSocket>
19
20class test_StateCheckRefreshAddress;
21
22namespace governikus
23{
24
26 : public AbstractState
27 , public GenericContextContainer<AuthContext>
28{
29 Q_OBJECT
30 friend class StateBuilder;
31 friend class ::test_StateCheckRefreshAddress;
32
33 private:
34 QSharedPointer<QNetworkReply> mReply;
35 QUrl mUrl;
36 QUrl mSubjectUrl;
37 bool mCertificateFetched;
38 QVector<QUrl> mVerifiedRefreshUrlHosts;
39
40 explicit StateCheckRefreshAddress(const QSharedPointer<WorkflowContext>& pContext);
41
42 [[nodiscard]] bool isMatchingSameOriginPolicyInDevMode() const;
43 void run() override;
44
45 QUrl determineSubjectUrl();
46
47 void sendGetRequest();
48 void fetchServerCertificate();
49 bool checkSslConnectionAndSaveCertificate(const QSslConfiguration& pSslConfiguration);
50 void doneSuccess();
51 void reportCommunicationError(const GlobalStatus& pStatus);
52
53 private Q_SLOTS:
54 void onSslHandshakeDone();
55 void onNetworkReply();
56 void onSslErrors(const QList<QSslError>& errors);
57 void onSslHandshakeDoneFetchingServerCertificate();
58 void onNetworkErrorFetchingServerCertificate(QNetworkReply::NetworkError pError);
59
60 public:
61 void onEntry(QEvent* pEvent) override;
62 void onExit(QEvent* pEvent) override;
63};
64
65} // namespace governikus
Definition: AbstractState.h:20
Definition: GenericContextContainer.h:20
Definition: GlobalStatus.h:20
Definition: StateBuilder.h:18
Definition: StateCheckRefreshAddress.h:28
void onExit(QEvent *pEvent) override
Definition: StateCheckRefreshAddress.cpp:415
void onEntry(QEvent *pEvent) override
Definition: StateCheckRefreshAddress.cpp:407
Implementation of GeneralAuthenticate response APDUs.
Definition: CommandApdu.h:16