17 #ifndef QGSAUTHSSLCONFIGWIDGET_H 18 #define QGSAUTHSSLCONFIGWIDGET_H 23 #include "ui_qgsauthsslconfigwidget.h" 25 #include <QSslCertificate> 26 #include <QSslConfiguration> 53 const QSslCertificate &cert = QSslCertificate(),
54 const QString &hostport = QString(),
55 const QList<QSslCertificate> &connectionCAs = QList<QSslCertificate>() );
58 QGroupBox *certificateGroupBox();
60 QGroupBox *sslConfigGroupBox();
66 const QSslCertificate sslCertificate();
69 const QString sslHost();
72 QSsl::SslProtocol sslProtocol();
75 const QList<QSslError::SslError> sslIgnoreErrorEnums();
78 QSslSocket::PeerVerifyMode sslPeerVerifyMode();
84 int sslPeerVerifyDepth();
88 void enableSslCustomOptions(
bool enable );
92 void setSslCertificate(
const QSslCertificate &cert,
const QString &hostport = QString() );
98 void saveSslCertConfig();
101 void resetSslCertConfig();
104 void setSslProtocol( QSsl::SslProtocol protocol );
107 void resetSslProtocol();
110 void appendSslIgnoreErrors(
const QList<QSslError> &errors );
113 void setSslIgnoreErrorEnums(
const QList<QSslError::SslError> &errorenums );
116 void setSslIgnoreErrors(
const QList<QSslError> &errors );
119 void resetSslIgnoreErrors();
122 void setSslPeerVerify( QSslSocket::PeerVerifyMode mode,
int modedepth );
125 void resetSslPeerVerify();
128 void setSslHost(
const QString &host );
131 void setConfigCheckable(
bool checkable );
134 void validateHostPortText(
const QString &txt );
141 void configEnabledChanged(
bool enabled );
144 void certFoundInAuthDatabase(
bool found );
147 void hostPortValidityChanged(
bool valid );
150 void readyToSaveChanged(
bool cansave );
153 void btnCertInfo_clicked();
162 bool validateHostPort(
const QString &txt );
164 void setUpSslConfigTree();
165 QTreeWidgetItem *addRootItem(
const QString &label );
167 QSslCertificate mCert;
168 QList<QSslCertificate> mConnectionCAs;
170 QTreeWidgetItem *mProtocolItem =
nullptr;
171 QComboBox *mProtocolCmbBx =
nullptr;
172 QTreeWidgetItem *mIgnoreErrorsItem =
nullptr;
173 QTreeWidgetItem *mVerifyModeItem =
nullptr;
174 QComboBox *mVerifyPeerCmbBx =
nullptr;
175 QTreeWidgetItem *mVerifyDepthItem =
nullptr;
176 QSpinBox *mVerifyDepthSpnBx =
nullptr;
178 bool mCanSave =
false;
180 bool mDisabled =
false;
181 QVBoxLayout *mAuthNotifyLayout =
nullptr;
182 QLabel *mAuthNotify =
nullptr;
204 const QSslCertificate &cert = QSslCertificate(),
205 const QString &hostport = QString() );
211 void accept()
override;
214 void checkCanSave(
bool cansave );
218 QPushButton *mSaveButton =
nullptr;
221 #endif // QGSAUTHSSLCONFIGWIDGET_H
Configuration container for SSL server connection exceptions or overrides.
Dialog wrapper of widget for editing an SSL server configuration.
QgsAuthSslConfigWidget * sslCustomConfigWidget()
Access the embedded SSL server configuration widget.