在本页

sslConfiguration QML Type

sslConfiguration 类保存 SSL 连接的配置和状态。更多

Import Statement: import QtNetwork
Since: Qt 6.7

属性

方法

详细说明

sslConfiguration 用于传递有关打开的 SSL 连接的信息,并允许应用程序控制该连接的某些功能。sslConfiguration 内部封装了QSslConfiguration 对象。sslConfiguration 在 ctor 中调用 defaultSslCongiguration。

另请参阅 QSslConfiguration 。

属性文档

ciphers : string

将此配置的加密密码套件保存到ciphers ,这是一个以冒号分隔的密码套件名称列表。

另请参阅 QSslConfiguration::ciphers 。


peerVerifyDepth : int

持有在 SSL 握手阶段要检查的对等方证书链中证书的最大数量,如果没有设置最大深度,则为 0(默认值),表示要检查整个证书链。

另请参阅 QSslConfiguration::peerVerifyDepth 。


peerVerifyMode : enumeration

持有 PeerVerifyMode 枚举值。

另请参阅 QSslSocket::PeerVerifyMode 。


protocol : enumeration

持有 SslProtocol 枚举值。

另请参阅 QSsl::SslProtocol 。


sessionTicket : bytearray

以 ASN.1 格式保存 SSL 握手过程中使用的会话票据,适合持久保存到磁盘等。

另请参阅 QSslConfiguration::sessionTicket 。


sslOptions : QList

保存通过配置激活的 SslOption 值列表。

另请参见 QSsl::SslOption 。


方法文档

void setCertificateFiles(const QStringList &certificateFiles)

该函数将用户提供的证书列表certificateFiles 加载到配置中。


void setPrivateKey(const QQmlSslKey &privateKey)

该函数将用户定义的私钥值privateKey 设置到配置中。

另请参见 QSslKey 和sslKey 。


© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.