class QCoapSecurityConfiguration

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

Synopsis

Methods

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.

__init__()

Constructs a new QCoapSecurityConfiguration .

__init__(other)
Parameters:

otherQCoapSecurityConfiguration

Copies the configuration and state of other.

caCertificates()
Return type:

.list of QSslCertificate

Returns this connection’s certificate authority certificate database.

defaultCipherString()
Return type:

str

Returns the default cipher string.

localCertificateChain()
Return type:

.list of QSslCertificate

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

preSharedKey()
Return type:

QByteArray

Returns the pre shared key.

preSharedKeyIdentity()
Return type:

QByteArray

Returns the PSK client identity.

privateKey()
Return type:

QCoapPrivateKey

Returns the private key assigned to the connection.

setCaCertificates(certificates)
Parameters:

certificates – .list of QSslCertificate

Sets certificates as the certificate authority database for the connection.

See also

caCertificates()

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.

setLocalCertificateChain(localChain)
Parameters:

localChain – .list of QSslCertificate

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

setPreSharedKey(preSharedKey)
Parameters:

preSharedKeyQByteArray

Sets the pre shared key to preSharedKey.

See also

preSharedKey()

setPreSharedKeyIdentity(preSharedKeyIdentity)
Parameters:

preSharedKeyIdentityQByteArray

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

setPrivateKey(key)
Parameters:

keyQCoapPrivateKey

Sets the connection’s private key to key.

swap(other)
Parameters:

otherQCoapSecurityConfiguration

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