QgsAuthSslConfigWidget class
Widget for editing an SSL server configuration.
Contents
Constructors, destructors, conversion operators
- QgsAuthSslConfigWidget(QWidget* parent = nullptr, const QSslCertificate& cert = QSslCertificate(), const QString& hostport = QString(), const QList<QSslCertificate>& connectionCAs = QList<QSslCertificate>()) explicit
- Construct a widget for editing an SSL server certificate configuration.
Public functions
- auto certificateGroupBox() -> QGroupBox*
- Access to the certificate's group box widget.
- auto sslCertificate() -> const QSslCertificate
- Gets the SSL server certificate.
- auto sslConfigGroupBox() -> QGroupBox*
- Access to the SSL configuration's group box widget.
- auto sslCustomConfig() -> const QgsAuthConfigSslServer
- Gets the SSL configuration.
- auto sslHost() -> const QString
- Gets the host:port to associate with the server certificate.
- auto sslIgnoreErrorEnums() -> const QList<QSslError::SslError>
- Gets list of the SSL errors (as enums) to be ignored for connections.
- auto sslPeerVerifyDepth() -> int
- Gets the client's peer verify depth for connections.
- auto sslPeerVerifyMode() -> QSslSocket::PeerVerifyMode
- Gets the client's peer verify mode for connections.
- auto sslProtocol() -> QSsl::SslProtocol
- Gets the SSL protocol used for connections.
Signals
- void certFoundInAuthDatabase(bool found)
- Emitted when an certificate of same SHA hash is found in authentication database.
- void configEnabledChanged(bool enabled)
- Emitted when the enabled state of the configuration changes.
- void hostPortValidityChanged(bool valid)
- Emitted when the validity of the host:port changes.
- void readyToSaveChanged(bool cansave)
- Emitted when the configuration can be saved changes.
Public slots
- void appendSslIgnoreErrors(const QList<QSslError>& errors)
- Add to SSL errors to ignore for the connection.
- void enableSslCustomOptions(bool enable)
- Enable or disable the custom options widget.
- void loadSslCustomConfig(const QgsAuthConfigSslServer& config = QgsAuthConfigSslServer())
- Load an existing SSL server configuration.
- auto readyToSave() -> bool
- Verify if the configuration if ready to save.
- void resetSslCertConfig()
- Clear the current SSL server configuration and disabled it.
- void resetSslIgnoreErrors()
- Clear the SSL errors to ignore for the connection.
- void resetSslPeerVerify()
- Reset the client's peer verify mode for connections to default.
- void resetSslProtocol()
- Reset the SSL protocol to use in connections to the default.
- void saveSslCertConfig()
- Save the current SSL server configuration to the authentication database.
- void setConfigCheckable(bool checkable)
- Sets whether the config group box is checkable.
- void setSslCertificate(const QSslCertificate& cert, const QString& hostport = QString())
- Sets SSl certificate and any associated host:port.
- void setSslHost(const QString& host)
- Sets the host of the server.
- void setSslIgnoreErrorEnums(const QList<QSslError::SslError>& errorenums)
- Sets the SSL errors (as enums) to ignore for the connection.
- void setSslIgnoreErrors(const QList<QSslError>& errors)
- Sets the SSL errors to ignore for the connection.
- void setSslPeerVerify(QSslSocket::PeerVerifyMode mode, int modedepth)
- Sets the client's peer verify mode for connections.
- void setSslProtocol(QSsl::SslProtocol protocol)
- Sets the SSL protocol to use in connections.
- void validateHostPortText(const QString& txt)
- Parse string for host:port.
Function documentation
QgsAuthSslConfigWidget:: QgsAuthSslConfigWidget(QWidget* parent = nullptr,
const QSslCertificate& cert = QSslCertificate(),
const QString& hostport = QString(),
const QList<QSslCertificate>& connectionCAs = QList<QSslCertificate>()) explicit
Construct a widget for editing an SSL server certificate configuration.
| Parameters | |
|---|---|
| parent | Parent widget |
| cert | SSL server certificate object |
| hostport | Unique host:port to associate with the server certificate |
| connectionCAs | List of trusted Certificate Authorities objects |
int QgsAuthSslConfigWidget:: sslPeerVerifyDepth()
Gets the client's peer verify depth for connections.