PySide6.QtCoap.QCoapSecurityConfiguration¶
- class QCoapSecurityConfiguration¶
QCoapSecurityConfiguration类在认证过程中保存配置选项。更多…概要¶
方法¶
def
__init__()def
caCertificates()def
preSharedKey()def
privateKey()def
setPrivateKey()def
swap()
注意
本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。
详细描述¶
它包含诸如客户端身份、预共享密钥、证书信息等信息。
- __init__()¶
构造一个新的
QCoapSecurityConfiguration。- __init__(other)
- Parameters:
复制
other的配置和状态。- caCertificates()¶
- Return type:
返回此连接的证书颁发机构证书数据库。
另请参阅
- defaultCipherString()¶
- Return type:
字符串
返回默认的加密字符串。
- localCertificateChain()¶
- Return type:
返回在握手期间要呈现给对等方的证书链。
- Return type:
返回预共享密钥。
另请参阅
- Return type:
返回PSK客户端身份。
- privateKey()¶
- Return type:
返回分配给连接的私钥。
- setCaCertificates(certificates)¶
- Parameters:
certificates – QSslCertificate 的列表
将
certificates设置为连接的证书颁发机构数据库。另请参阅
- setDefaultCipherString(cipherString)¶
- Parameters:
cipherString – str
设置SSL加密字符串为
cipherString。安全后端(例如 OpenSSL)默认可能不包含RFC 7252所需的加密算法。此方法指定后端应使用的加密算法。例如,要启用 RFC 所需的 CCM 加密算法,可以将“AESCCM”作为
cipherString传递。有关加密字符串的更多信息,请参阅OpenSSL文档。
- setLocalCertificateChain(localChain)¶
- Parameters:
localChain – QSslCertificate 的列表
将
localChain设置为在握手期间向对等方呈现的证书链。- Parameters:
preSharedKey –
QByteArray
将预共享密钥设置为
preSharedKey。另请参阅
- Parameters:
preSharedKeyIdentity –
QByteArray
将PSK客户端身份(将通知给服务器)设置为
identity。- setPrivateKey(key)¶
- Parameters:
key –
QCoapPrivateKey
将连接的私钥设置为
key。- swap(other)¶
- Parameters:
将此安全配置与
other交换。此操作非常快速且永远不会失败。