QCoapSecurityConfiguration#

The QCoapSecurityConfiguration class holds configuration options during the authentication process. More

Synopsis#

Functions#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

It holds information such as client identity, pre shared key, information about certificates, and so on.

class PySide6.QtCoap.QCoapSecurityConfiguration#

PySide6.QtCoap.QCoapSecurityConfiguration(other)

Parameters:

otherPySide6.QtCoap.QCoapSecurityConfiguration

Constructs a new QCoapSecurityConfiguration .

Copies the configuration and state of other.

PySide6.QtCoap.QCoapSecurityConfiguration.caCertificates()#
Return type:

.list of QSslCertificate

Returns this connection’s certificate authority certificate database.

PySide6.QtCoap.QCoapSecurityConfiguration.defaultCipherString()#
Return type:

str

Returns the default cipher string.

PySide6.QtCoap.QCoapSecurityConfiguration.localCertificateChain()#
Return type:

.list of QSslCertificate

Returns the certificate chain to be presented to the peer during the handshake.

PySide6.QtCoap.QCoapSecurityConfiguration.preSharedKey()#
Return type:

PySide6.QtCore.QByteArray

Returns the pre shared key.

PySide6.QtCoap.QCoapSecurityConfiguration.preSharedKeyIdentity()#
Return type:

PySide6.QtCore.QByteArray

Returns the PSK client identity.

PySide6.QtCoap.QCoapSecurityConfiguration.privateKey()#
Return type:

PySide6.QtCoap.QCoapPrivateKey

Returns the private key assigned to the connection.

PySide6.QtCoap.QCoapSecurityConfiguration.setCaCertificates(certificates)#
Parameters:

certificates – .list of QSslCertificate

Sets certificates as the certificate authority database for the connection.

See also

caCertificates()

PySide6.QtCoap.QCoapSecurityConfiguration.setDefaultCipherString(cipherString)#
Parameters:

cipherString – str

Sets the SSL cipher string to cipherString.

The security back-end (for example OpenSSL) might not include ciphers required for RFC 7252 by default. This method specifies which ciphers the back-end should use. For example to enable CCM ciphers required by RFC, “AESCCM” can be passed as cipherString.

See the OpenSSL docs for more information about cipher strings.

PySide6.QtCoap.QCoapSecurityConfiguration.setLocalCertificateChain(localChain)#
Parameters:

localChain – .list of QSslCertificate

Sets localChain as the certificate chain to present to the peer during the handshake.

PySide6.QtCoap.QCoapSecurityConfiguration.setPreSharedKey(preSharedKey)#
Parameters:

preSharedKeyPySide6.QtCore.QByteArray

Sets the pre shared key to preSharedKey.

See also

preSharedKey()

PySide6.QtCoap.QCoapSecurityConfiguration.setPreSharedKeyIdentity(preSharedKeyIdentity)#
Parameters:

preSharedKeyIdentityPySide6.QtCore.QByteArray

Sets the PSK client identity (to be advised to the server) to identity.

PySide6.QtCoap.QCoapSecurityConfiguration.setPrivateKey(key)#
Parameters:

keyPySide6.QtCoap.QCoapPrivateKey

Sets the connection’s private key to key.

PySide6.QtCoap.QCoapSecurityConfiguration.swap(other)#
Parameters:

otherPySide6.QtCoap.QCoapSecurityConfiguration

Swaps this security configuration with other. This operation is very fast and never fails.