QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
auth
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 "ui_qgsauthimportidentitydialog.h"
21
22
#include "qgis_gui.h"
23
#include "
qgis_sip.h
"
24
#include "
qgsauthconfig.h
"
25
26
#include <QDialog>
27
#include <QSslCertificate>
28
#include <QSslKey>
29
34
class
GUI_EXPORT
QgsAuthImportIdentityDialog
:
public
QDialog,
private
Ui::QgsAuthImportIdentityDialog
35
{
36
Q_OBJECT
37
38
public
:
40
enum
IdentityType
41
{
42
CertIdentity
= 0,
43
};
44
46
enum
BundleTypes
47
{
48
PkiPaths
= 0,
49
PkiPkcs12
= 1,
50
};
51
53
enum
Validity
54
{
55
Valid
,
56
Invalid
,
57
Unknown
58
};
59
65
explicit
QgsAuthImportIdentityDialog
(
QgsAuthImportIdentityDialog::IdentityType
identitytype, QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
66
68
QgsAuthImportIdentityDialog::IdentityType
identityType()
const
;
69
74
const
QPair<QSslCertificate, QSslKey> certBundleToImport()
SIP_SKIP
;
75
77
const
QgsPkiBundle
pkiBundleToImport
()
const
{
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
111
QgsAuthImportIdentityDialog::IdentityType
mIdentityType = CertIdentity;
112
QPair<QSslCertificate, QSslKey> mCertBundle;
113
QgsPkiBundle
mPkiBundle;
114
115
bool
mDisabled =
false
;
116
QVBoxLayout *mAuthNotifyLayout =
nullptr
;
117
QLabel *mAuthNotify =
nullptr
;
118
};
119
120
#endif
// QGSAUTHIMPORTIDENTITYDIALOG_H
QgsAuthImportIdentityDialog
Widget for importing an identity certificate/key bundle into the authentication database.
Definition
qgsauthimportidentitydialog.h:35
QgsAuthImportIdentityDialog::BundleTypes
BundleTypes
Type of bundles supported.
Definition
qgsauthimportidentitydialog.h:47
QgsAuthImportIdentityDialog::PkiPaths
@ PkiPaths
Definition
qgsauthimportidentitydialog.h:48
QgsAuthImportIdentityDialog::PkiPkcs12
@ PkiPkcs12
Definition
qgsauthimportidentitydialog.h:49
QgsAuthImportIdentityDialog::Validity
Validity
Type of certificate/bundle validity output.
Definition
qgsauthimportidentitydialog.h:54
QgsAuthImportIdentityDialog::Invalid
@ Invalid
Definition
qgsauthimportidentitydialog.h:56
QgsAuthImportIdentityDialog::Valid
@ Valid
Definition
qgsauthimportidentitydialog.h:55
QgsAuthImportIdentityDialog::Unknown
@ Unknown
Definition
qgsauthimportidentitydialog.h:57
QgsAuthImportIdentityDialog::IdentityType
IdentityType
Type of identity being imported.
Definition
qgsauthimportidentitydialog.h:41
QgsAuthImportIdentityDialog::CertIdentity
@ CertIdentity
Definition
qgsauthimportidentitydialog.h:42
QgsAuthImportIdentityDialog::pkiBundleToImport
const QgsPkiBundle pkiBundleToImport() const
Gets certificate/key bundle to be imported as a PKI bundle object.
Definition
qgsauthimportidentitydialog.h:77
QgsAuthImportIdentityDialog::QgsAuthImportIdentityDialog
QgsAuthImportIdentityDialog(QgsAuthImportIdentityDialog::IdentityType identitytype, QWidget *parent=nullptr)
Construct a dialog for importing identities.
Definition
qgsauthimportidentitydialog.cpp:38
QgsPkiBundle
Storage set for PKI bundle: SSL certificate, key, optional CA cert chain.
Definition
qgsauthconfig.h:208
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:138
qgsauthconfig.h
Generated on
for QGIS API Documentation by
1.17.0