Class: QgsAuthSslConfigWidget

Widget for editing an SSL server configuration.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsAuthSslConfigWidget

Base classes

QWidget

QObject

QPaintDevice

Methods

appendSslIgnoreErrors

Add to SSL errors to ignore for the connection

certificateGroupBox

Access to the certificate's group box widget

enableSslCustomOptions

Enable or disable the custom options widget

loadSslCustomConfig

Load an existing SSL server configuration

readyToSave

Verify if the configuration if ready to save

resetSslCertConfig

Clear the current SSL server configuration and disabled it

resetSslIgnoreErrors

Clear the SSL errors to ignore for the connection

resetSslPeerVerify

Reset the client's peer verify mode for connections to default

resetSslProtocol

Reset the SSL protocol to use in connections to the default

saveSslCertConfig

Save the current SSL server configuration to the authentication database

setConfigCheckable

Sets whether the config group box is checkable

setSslCertificate

Sets SSl certificate and any associated host:port

setSslHost

Sets the host of the server

setSslIgnoreErrorEnums

Sets the SSL errors (as enums) to ignore for the connection

setSslIgnoreErrors

Sets the SSL errors to ignore for the connection

setSslPeerVerify

Sets the client's peer verify mode for connections

setSslProtocol

Sets the SSL protocol to use in connections

sslCertificate

Gets the SSL server certificate

sslConfigGroupBox

Access to the SSL configuration's group box widget

sslCustomConfig

Gets the SSL configuration

sslHost

Gets the host:port to associate with the server certificate

sslIgnoreErrorEnums

Gets list of the SSL errors (as enums) to be ignored for connections

sslPeerVerifyDepth

Gets the client's peer verify depth for connections

sslPeerVerifyMode

Gets the client's peer verify mode for connections

sslProtocol

Gets the SSL protocol used for connections

validateHostPortText

Parse string for host:port

Signals

certFoundInAuthDatabase

Emitted when an certificate of same SHA hash is found in authentication database

configEnabledChanged

Emitted when the enabled state of the configuration changes

hostPortValidityChanged

Emitted when the validity of the host:port changes

readyToSaveChanged

Emitted when the configuration can be saved changes

class qgis.gui.QgsAuthSslConfigWidget[source]

Bases: QWidget

__init__(parent: QWidget | None = None, cert: QSslCertificate = QSslCertificate(), hostport: str | None = '', connectionCAs: Iterable[QSslCertificate] = [])

Construct a widget for editing an SSL server certificate configuration

Parameters:
  • parent (Optional[QWidget] = None) – Parent widget

  • cert (QSslCertificate = QSslCertificate()) – SSL server certificate object

  • hostport (Optional[str] = '') – Unique host:port to associate with the server certificate

  • connectionCAs (Iterable[QSslCertificate] = []) – List of trusted Certificate Authorities objects

appendSslIgnoreErrors(self, errors: Iterable[QSslError])[source]

Add to SSL errors to ignore for the connection

Parameters:

errors (Iterable[QSslError])

signal certFoundInAuthDatabase(found: bool)[source]

Emitted when an certificate of same SHA hash is found in authentication database

Parameters:

found (bool)

certificateGroupBox(self) QGroupBox | None[source]

Access to the certificate’s group box widget

Return type:

Optional[QGroupBox]

signal configEnabledChanged(enabled: bool)[source]

Emitted when the enabled state of the configuration changes

Parameters:

enabled (bool)

enableSslCustomOptions(self, enable: bool)[source]

Enable or disable the custom options widget

Parameters:

enable (bool)

signal hostPortValidityChanged(valid: bool)[source]

Emitted when the validity of the host:port changes

Parameters:

valid (bool)

loadSslCustomConfig(self, config: QgsAuthConfigSslServer = QgsAuthConfigSslServer())[source]

Load an existing SSL server configuration

Parameters:

config (QgsAuthConfigSslServer = QgsAuthConfigSslServer())

readyToSave(self) bool[source]

Verify if the configuration if ready to save

Return type:

bool

signal readyToSaveChanged(cansave: bool)[source]

Emitted when the configuration can be saved changes

Parameters:

cansave (bool)

resetSslCertConfig(self)[source]

Clear the current SSL server configuration and disabled it

resetSslIgnoreErrors(self)[source]

Clear the SSL errors to ignore for the connection

resetSslPeerVerify(self)[source]

Reset the client’s peer verify mode for connections to default

resetSslProtocol(self)[source]

Reset the SSL protocol to use in connections to the default

saveSslCertConfig(self)[source]

Save the current SSL server configuration to the authentication database

setConfigCheckable(self, checkable: bool)[source]

Sets whether the config group box is checkable

Parameters:

checkable (bool)

setSslCertificate(self, cert: QSslCertificate, hostport: str | None = '')[source]

Sets SSl certificate and any associated host:port

Parameters:
  • cert (QSslCertificate)

  • hostport (Optional[str] = '')

setSslHost(self, host: str | None)[source]

Sets the host of the server

Parameters:

host (Optional[str])

setSslIgnoreErrorEnums(self, errorenums: Any)[source]

Sets the SSL errors (as enums) to ignore for the connection

Parameters:

errorenums (Any)

setSslIgnoreErrors(self, errors: Iterable[QSslError])[source]

Sets the SSL errors to ignore for the connection

Parameters:

errors (Iterable[QSslError])

setSslPeerVerify(self, mode: QSslSocket.PeerVerifyMode, modedepth: int)[source]

Sets the client’s peer verify mode for connections

Parameters:
  • mode (QSslSocket.PeerVerifyMode)

  • modedepth (int)

setSslProtocol(self, protocol: QSsl.SslProtocol)[source]

Sets the SSL protocol to use in connections

Parameters:

protocol (QSsl.SslProtocol)

sslCertificate(self) QSslCertificate[source]

Gets the SSL server certificate

Return type:

QSslCertificate

sslConfigGroupBox(self) QGroupBox | None[source]

Access to the SSL configuration’s group box widget

Return type:

Optional[QGroupBox]

sslCustomConfig(self) QgsAuthConfigSslServer[source]

Gets the SSL configuration

Return type:

QgsAuthConfigSslServer

sslHost(self) str[source]

Gets the host:port to associate with the server certificate

Return type:

str

sslIgnoreErrorEnums(self) Any

Gets list of the SSL errors (as enums) to be ignored for connections

Return type:

Any

sslPeerVerifyDepth(self) int[source]

Gets the client’s peer verify depth for connections

Note

Value of 0 = unlimited

Return type:

int

sslPeerVerifyMode(self) QSslSocket.PeerVerifyMode[source]

Gets the client’s peer verify mode for connections

Return type:

QSslSocket.PeerVerifyMode

sslProtocol(self) QSsl.SslProtocol[source]

Gets the SSL protocol used for connections

Return type:

QSsl.SslProtocol

validateHostPortText(self, txt: str | None)[source]

Parse string for host:port

Parameters:

txt (Optional[str])