Obsolete Members for QSslSocket

以下成员源于类 QSslSocket 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

公共函数

(obsolete) QList<QSslCertificate> caCertificates () const
(obsolete) QList<QSslCipher> ciphers () const
(obsolete) dumpObjectInfo ()
(obsolete) dumpObjectTree ()
(obsolete) void setCaCertificates (const QList<QSslCertificate> & certificates )
(obsolete) void setCiphers (const QList<QSslCipher> & ciphers )
(obsolete) void setCiphers (const QString & ciphers )

静态公共成员

(obsolete) QList<QSslCertificate> defaultCaCertificates ()
(obsolete) QList<QSslCipher> defaultCiphers ()
(obsolete) void setDefaultCaCertificates (const QList<QSslCertificate> & certificates )
(obsolete) void setDefaultCiphers (const QList<QSslCipher> & ciphers )
(obsolete) QList<QSslCipher> supportedCiphers ()
(obsolete) QList<QSslCertificate> systemCaCertificates ()

成员函数文档编制

QList < QSslCertificate > QSslSocket:: caCertificates () const

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

使用 QSslConfiguration::caCertificates () 代替。

Returns this socket's CA certificate database. The CA certificate database is used by the socket during the handshake phase to validate the peer's certificate. It can be moodified prior to the handshake with addCaCertificate (), addCaCertificates (),和 setCaCertificates ().

注意: On Unix, this method may return an empty list if the root certificates are loaded on demand.

另请参阅 addCaCertificate (), addCaCertificates (),和 setCaCertificates ().

QList < QSslCipher > QSslSocket:: ciphers () const

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

使用 QSslConfiguration::ciphers () 代替。

Returns this socket's current cryptographic cipher suite. This list is used during the socket's handshake phase for choosing a session cipher. The returned list of ciphers is ordered by descending preference. (i.e., the first cipher in the list is the most preferred cipher). The session cipher will be the first one in the list that is also supported by the peer.

By default, the handshake phase can choose any of the ciphers supported by this system's SSL libraries, which may vary from system to system. The list of ciphers supported by this system's SSL libraries is returned by supportedCiphers (). You can restrict the list of ciphers used for choosing the session cipher for this socket by calling setCiphers () with a subset of the supported ciphers. You can revert to using the entire set by calling setCiphers () with the list returned by supportedCiphers ().

You can restrict the list of ciphers used for choosing the session cipher for all sockets by calling setDefaultCiphers () with a subset of the supported ciphers. You can revert to using the entire set by calling setCiphers () with the list returned by supportedCiphers ().

另请参阅 setCiphers (), defaultCiphers (), setDefaultCiphers (),和 supportedCiphers ().

[static] QList < QSslCertificate > QSslSocket:: defaultCaCertificates ()

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

使用 QSslConfiguration::caCertificates () on the default QSslConfiguration 代替。

Returns the current default CA certificate database. This database is originally set to your system's default CA certificate database. If no system default database is found, an empty database will be returned. You can override the default CA certificate database with your own CA certificate database using setDefaultCaCertificates ().

Each SSL socket's CA certificate database is initialized to the default CA certificate database.

注意: On Unix, this method may return an empty list if the root certificates are loaded on demand.

另请参阅 setDefaultCaCertificates () 和 caCertificates ().

[static] QList < QSslCipher > QSslSocket:: defaultCiphers ()

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

使用 QSslConfiguration::ciphers () on the default QSslConfiguration 代替。

Returns the default cryptographic cipher suite for all sockets in this application. This list is used during the socket's handshake phase when negotiating with the peer to choose a session cipher. The list is ordered by preference (i.e., the first cipher in the list is the most preferred cipher).

By default, the handshake phase can choose any of the ciphers supported by this system's SSL libraries, which may vary from system to system. The list of ciphers supported by this system's SSL libraries is returned by supportedCiphers ().

另请参阅 setDefaultCiphers () 和 supportedCiphers ().

void QSslSocket:: setCaCertificates (const QList < QSslCertificate > & certificates )

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

使用 QSslConfiguration::setCaCertificates () 代替。

Sets this socket's CA certificate database to be certificates . The certificate database must be set prior to the SSL handshake. The CA certificate database is used by the socket during the handshake phase to validate the peer's certificate.

The CA certificate database can be reset to the current default CA certificate database by calling this function with the list of CA certificates returned by defaultCaCertificates ().

另请参阅 caCertificates () 和 defaultCaCertificates ().

void QSslSocket:: setCiphers (const QList < QSslCipher > & ciphers )

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

USe QSslConfiguration::setCiphers () 代替。

Sets the cryptographic cipher suite for this socket to ciphers , which must contain a subset of the ciphers in the list returned by supportedCiphers ().

Restricting the cipher suite must be done before the handshake phase, where the session cipher is chosen.

另请参阅 ciphers (), setDefaultCiphers (),和 supportedCiphers ().

void QSslSocket:: setCiphers (const QString & ciphers )

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

使用 QSslConfiguration::setCiphers () 代替。

Sets the cryptographic cipher suite for this socket to ciphers , which is a colon-separated list of cipher suite names. The ciphers are listed in order of preference, starting with the most preferred cipher. For example:

QSslSocket socket;
socket.setCiphers("DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:AES256-SHA");
					

Each cipher name in ciphers must be the name of a cipher in the list returned by supportedCiphers (). Restricting the cipher suite must be done before the handshake phase, where the session cipher is chosen.

另请参阅 ciphers (), setDefaultCiphers (),和 supportedCiphers ().

[static] void QSslSocket:: setDefaultCaCertificates (const QList < QSslCertificate > & certificates )

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

使用 QSslConfiguration::setCaCertificates () on the default QSslConfiguration 代替。

Sets the default CA certificate database to certificates . The default CA certificate database is originally set to your system's default CA certificate database. You can override the default CA certificate database with your own CA certificate database using this function.

Each SSL socket's CA certificate database is initialized to the default CA certificate database.

另请参阅 defaultCaCertificates () 和 addDefaultCaCertificate ().

[static] void QSslSocket:: setDefaultCiphers (const QList < QSslCipher > & ciphers )

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

使用 QSslConfiguration::setCiphers () on the default QSslConfiguration 代替。

Sets the default cryptographic cipher suite for all sockets in this application to ciphers , which must contain a subset of the ciphers in the list returned by supportedCiphers ().

Restricting the default cipher suite only affects SSL sockets that perform their handshake phase after the default cipher suite has been changed.

另请参阅 setCiphers (), defaultCiphers (),和 supportedCiphers ().

[static] QList < QSslCipher > QSslSocket:: supportedCiphers ()

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

使用 QSslConfiguration::supportedCiphers () 代替。

Returns the list of cryptographic ciphers supported by this system. This list is set by the system's SSL libraries and may vary from system to system.

另请参阅 defaultCiphers (), ciphers (),和 setCiphers ().

[static] QList < QSslCertificate > QSslSocket:: systemCaCertificates ()

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

Use QSslConfiguration::systemDefaultCaCertificates instead.

This function provides the CA certificate database provided by the operating system. The CA certificate database returned by this function is used to initialize the database returned by defaultCaCertificates (). You can replace that database with your own with setDefaultCaCertificates ().

注意: : On OS X, only certificates that are either trusted for all purposes or trusted for the purpose of SSL in the keychain will be returned.

另请参阅 caCertificates (), defaultCaCertificates (),和 setDefaultCaCertificates ().