AusweisApp2
 Alle Klassen Namensbereiche Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Propertys Freundbeziehungen Makrodefinitionen
StateCheckRefreshAddress.h
gehe zur Dokumentation dieser Datei
1 
8 #pragma once
9 
10 #include "context/AuthContext.h"
12 
13 #include <QNetworkReply>
14 #include <QScopedPointer>
15 #include <QSslCertificate>
16 #include <QSslError>
17 #include <QSslSocket>
18 
19 class test_StateCheckRefreshAddress;
20 
21 namespace governikus
22 {
23 
25  : public AbstractGenericState<AuthContext>
26 {
27  Q_OBJECT
28  friend class StateBuilder;
29  friend class ::test_StateCheckRefreshAddress;
30 
31  StateCheckRefreshAddress(const QSharedPointer<WorkflowContext>& pContext);
32 
33  private:
34  QPointer<QNetworkReply> mReply;
35  QUrl mUrl;
36  QUrl mSubjectUrl;
37  bool mCertificateFetched;
38  QVector<QUrl> mVerifiedRefreshUrlHosts;
39 
40  bool isMatchingSameOriginPolicyInDevMode() const;
41  virtual void run() override;
42 
43  QUrl determineSubjectUrl();
44 
45  void sendGetRequest();
46  void fetchServerCertificate();
47  bool checkSslConnectionAndSaveCertificate(const QSslConfiguration& pSslConfiguration);
48  void doneSuccess();
49  void reportCommunicationError(const GlobalStatus& pStatus);
50 
51  private Q_SLOTS:
52  void onSslHandshakeDone();
53  void onNetworkReply();
54  void onSslErrors(const QList<QSslError>& errors);
55  void onSslHandshakeDoneFetchingServerCertificate();
56  void onNetworkErrorFetchingServerCertificate(QNetworkReply::NetworkError pError);
57 
58 };
59 
60 } /* namespace governikus */
Definition: GlobalStatus.h:18
Definition: AbstractGenericState.h:21
Definition: StateCheckRefreshAddress.h:24
Definition: StateBuilder.h:17