Class: QgsAuthSslConfigWidget

class qgis.gui.QgsAuthSslConfigWidget(parent: QWidget = None, cert: QSslCertificate = QSslCertificate(), hostport: str = '', connectionCAs: Iterable[QSslCertificate] = [])

Bases: PyQt5.QtWidgets.QWidget

Construct a widget for editing an SSL server certificate configuration

Parameters
  • parent (QWidget = None) – Parent widget

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

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

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

Widget for editing an SSL server configuration

Methods

actionEvent

appendSslIgnoreErrors

Add to SSL errors to ignore for the connection

certificateGroupBox

Access to the certificate’s group box widget

changeEvent

childEvent

closeEvent

connectNotify

contextMenuEvent

create

customEvent

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

enableSslCustomOptions

Enable or disable the custom options widget

enterEvent

event

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hideEvent

initPainter

inputMethodEvent

isSignalConnected

keyPressEvent

keyReleaseEvent

leaveEvent

loadSslCustomConfig

Load an existing SSL server configuration

metric

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

paintEvent

readyToSave

Verify if the configuration if ready to save

receivers

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

resizeEvent

saveSslCertConfig

Save the current SSL server configuration to the authentication database

sender

senderSignalIndex

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

sharedPainter

showEvent

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

tabletEvent

timerEvent

updateMicroFocus

validateHostPortText

Parse string for host:port

wheelEvent

Signals

certFoundInAuthDatabase

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

configEnabledChanged

Emitted when the enabled state of the configuration changes [signal]

hostPortValidityChanged

Emitted when the validity of the host:port changes [signal]

readyToSaveChanged

Emitted when the configuration can be saved changes [signal]

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

Add to SSL errors to ignore for the connection

Parameters

errors (Iterable[QSslError]) –

certFoundInAuthDatabase

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

Parameters

found (bool) –

certificateGroupBox(self) → QGroupBox

Access to the certificate’s group box widget

Return type

QGroupBox

changeEvent()
childEvent()
closeEvent()
configEnabledChanged

Emitted when the enabled state of the configuration changes [signal]

Parameters

enabled (bool) –

connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enableSslCustomOptions(self, enable: bool)

Enable or disable the custom options widget

Parameters

enable (bool) –

enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
hostPortValidityChanged

Emitted when the validity of the host:port changes [signal]

Parameters

valid (bool) –

initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
loadSslCustomConfig(self, config: QgsAuthConfigSslServer = QgsAuthConfigSslServer())

Load an existing SSL server configuration

Parameters

config (QgsAuthConfigSslServer = QgsAuthConfigSslServer()) –

metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
readyToSave(self) → bool

Verify if the configuration if ready to save

Return type

bool

readyToSaveChanged

Emitted when the configuration can be saved changes [signal]

Parameters

cansave (bool) –

receivers()
resetSslCertConfig(self)

Clear the current SSL server configuration and disabled it

resetSslIgnoreErrors(self)

Clear the SSL errors to ignore for the connection

resetSslPeerVerify(self)

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

resetSslProtocol(self)

Reset the SSL protocol to use in connections to the default

resizeEvent()
saveSslCertConfig(self)

Save the current SSL server configuration to the authentication database

sender()
senderSignalIndex()
setConfigCheckable(self, checkable: bool)

Sets whether the config group box is checkable

Parameters

checkable (bool) –

setSslCertificate(self, cert: QSslCertificate, hostport: str = '')

Sets SSl certificate and any associated host:port

Parameters
  • cert (QSslCertificate) –

  • hostport (str = '') –

setSslHost(self, host: str)

Sets the host of the server

Parameters

host (str) –

setSslIgnoreErrorEnums(self, errorenums: object)

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

Parameters

errorenums (object) –

setSslIgnoreErrors(self, errors: Iterable[QSslError])

Sets the SSL errors to ignore for the connection

Parameters

errors (Iterable[QSslError]) –

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

Sets the client’s peer verify mode for connections

Parameters
  • mode (QSslSocket.PeerVerifyMode) –

  • modedepth (int) –

setSslProtocol(self, protocol: QSsl.SslProtocol)

Sets the SSL protocol to use in connections

Parameters

protocol (QSsl.SslProtocol) –

sharedPainter()
showEvent()
sslCertificate(self) → QSslCertificate

Gets the SSL server certificate

Return type

QSslCertificate

sslConfigGroupBox(self) → QGroupBox

Access to the SSL configuration’s group box widget

Return type

QGroupBox

sslCustomConfig(self) → QgsAuthConfigSslServer

Gets the SSL configuration

Return type

QgsAuthConfigSslServer

sslHost(self) → str

Gets the host:port to associate with the server certificate

Return type

str

sslIgnoreErrorEnums(self) → object

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

Return type

object

sslPeerVerifyDepth(self) → int

Gets the client’s peer verify depth for connections

Note

Value of 0 = unlimited

Return type

int

sslPeerVerifyMode(self) → QSslSocket.PeerVerifyMode

Gets the client’s peer verify mode for connections

Return type

QSslSocket.PeerVerifyMode

sslProtocol(self) → QSsl.SslProtocol

Gets the SSL protocol used for connections

Return type

QSsl.SslProtocol

tabletEvent()
timerEvent()
updateMicroFocus()
validateHostPortText(self, txt: str)

Parse string for host:port

Parameters

txt (str) –

wheelEvent()