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