QGIS API Documentation 3.41.0-Master (57ec4277f5e)
Loading...
Searching...
No Matches
qgsauthimportidentitydialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsauthimportidentitydialog.cpp
3 ---------------------
4 begin : May 9, 2015
5 copyright : (C) 2015 by Boundless Spatial, Inc. USA
6 author : Larry Shaffer
7 email : lshaffer at boundlessgeo dot com
8 ***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17#ifndef QGSAUTHIMPORTIDENTITYDIALOG_H
18#define QGSAUTHIMPORTIDENTITYDIALOG_H
19
20#include <QDialog>
21#include "qgis_sip.h"
22#include "ui_qgsauthimportidentitydialog.h"
23
24#include <QSslCertificate>
25#include <QSslKey>
26
27#include "qgsauthconfig.h"
28#include "qgis_gui.h"
29
34class GUI_EXPORT QgsAuthImportIdentityDialog : public QDialog, private Ui::QgsAuthImportIdentityDialog
35{
36 Q_OBJECT
37
38 public:
41 {
42 CertIdentity = 0,
43 };
44
47 {
48 PkiPaths = 0,
49 PkiPkcs12 = 1,
50 };
51
54 {
57 Unknown
58 };
59
65 explicit QgsAuthImportIdentityDialog( QgsAuthImportIdentityDialog::IdentityType identitytype, QWidget *parent SIP_TRANSFERTHIS = nullptr );
66
69
74 const QPair<QSslCertificate, QSslKey> certBundleToImport() SIP_SKIP;
75
77 const QgsPkiBundle pkiBundleToImport() { return mPkiBundle; }
78
79 private slots:
80 void populateIdentityType();
81
82 void validateIdentity();
83
84
85 void clearValidation();
86 void writeValidation( const QString &msg, QgsAuthImportIdentityDialog::Validity valid, bool append = false );
87
88 // Cert Identity - PkiPaths
89 void lePkiPathsKeyPass_textChanged( const QString &pass );
90 void chkPkiPathsPassShow_stateChanged( int state );
91
92 void btnPkiPathsCert_clicked();
93 void btnPkiPathsKey_clicked();
94
95 // Cert Identity - PkiPkcs#12
96 void lePkiPkcs12KeyPass_textChanged( const QString &pass );
97 void chkPkiPkcs12PassShow_stateChanged( int state );
98
99 void btnPkiPkcs12Bundle_clicked();
100
101 private:
102 bool validateBundle();
103 bool validatePkiPaths();
104 bool validatePkiPkcs12();
105
106 void fileFound( bool found, QWidget *widget );
107 QString getOpenFileName( const QString &title, const QString &extfilter );
108
109 QPushButton *okButton();
110
112 QPair<QSslCertificate, QSslKey> mCertBundle;
113 QgsPkiBundle mPkiBundle;
114
115 bool mDisabled;
116 QVBoxLayout *mAuthNotifyLayout = nullptr;
117 QLabel *mAuthNotify = nullptr;
118};
119
120#endif // QGSAUTHIMPORTIDENTITYDIALOG_H
Widget for importing an identity certificate/key bundle into the authentication database.
BundleTypes
Type of bundles supported.
Validity
Type of certificate/bundle validity output.
IdentityType
Type of identity being imported.
Storage set for PKI bundle: SSL certificate, key, optional CA cert chain.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_SKIP
Definition qgis_sip.h:126