src/network/ssl/qsslsocket.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
child 37 758a864f9613
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
   572     requests a certificate from the server, or a server requesting a
   572     requests a certificate from the server, or a server requesting a
   573     certificate from the client), and whether it should require that this
   573     certificate from the client), and whether it should require that this
   574     certificate is valid.
   574     certificate is valid.
   575 
   575 
   576     The default mode is AutoVerifyPeer, which tells QSslSocket to use
   576     The default mode is AutoVerifyPeer, which tells QSslSocket to use
   577     VerifyPeer for clients, QueryPeer for clients.
   577     VerifyPeer for clients and QueryPeer for servers.
   578 
   578 
   579     \sa setPeerVerifyMode(), peerVerifyDepth(), mode()
   579     \sa setPeerVerifyMode(), peerVerifyDepth(), mode()
   580 */
   580 */
   581 QSslSocket::PeerVerifyMode QSslSocket::peerVerifyMode() const
   581 QSslSocket::PeerVerifyMode QSslSocket::peerVerifyMode() const
   582 {
   582 {
   592     requests a certificate from the server, or a server requesting a
   592     requests a certificate from the server, or a server requesting a
   593     certificate from the client), and whether it should require that this
   593     certificate from the client), and whether it should require that this
   594     certificate is valid.
   594     certificate is valid.
   595 
   595 
   596     The default mode is AutoVerifyPeer, which tells QSslSocket to use
   596     The default mode is AutoVerifyPeer, which tells QSslSocket to use
   597     VerifyPeer for clients, QueryPeer for clients.
   597     VerifyPeer for clients and QueryPeer for servers.
   598 
   598 
   599     Setting this mode after encryption has started has no effect on the
   599     Setting this mode after encryption has started has no effect on the
   600     current connection.
   600     current connection.
   601 
   601 
   602     \sa peerVerifyMode(), setPeerVerifyDepth(), mode()
   602     \sa peerVerifyMode(), setPeerVerifyDepth(), mode()
  1327 }
  1327 }
  1328 
  1328 
  1329 /*!
  1329 /*!
  1330     Returns the current default CA certificate database. This database
  1330     Returns the current default CA certificate database. This database
  1331     is originally set to your system's default CA certificate database.
  1331     is originally set to your system's default CA certificate database.
  1332     If no system default database is found, Qt will provide its own
  1332     If no system default database is found, an empty database will be
  1333     default database. You can override the default CA certificate database
  1333     returned. You can override the default CA certificate database
  1334     with your own CA certificate database using setDefaultCaCertificates().
  1334     with your own CA certificate database using setDefaultCaCertificates().
  1335 
  1335 
  1336     Each SSL socket's CA certificate database is initialized to the
  1336     Each SSL socket's CA certificate database is initialized to the
  1337     default CA certificate database.
  1337     default CA certificate database.
  1338 
  1338 
  1342 {
  1342 {
  1343     return QSslSocketPrivate::defaultCaCertificates();
  1343     return QSslSocketPrivate::defaultCaCertificates();
  1344 }
  1344 }
  1345 
  1345 
  1346 /*!
  1346 /*!
  1347     This function provides a default CA certificate database
  1347     This function provides the CA certificate database
  1348     shipped together with Qt. The CA certificate database
  1348     provided by the operating system. The CA certificate database
  1349     returned by this function is used to initialize the database
  1349     returned by this function is used to initialize the database
  1350     returned by defaultCaCertificates(). You can replace that database
  1350     returned by defaultCaCertificates(). You can replace that database
  1351     with your own with setDefaultCaCertificates().
  1351     with your own with setDefaultCaCertificates().
  1352 
  1352 
  1353     \sa caCertificates(), defaultCaCertificates(), setDefaultCaCertificates()
  1353     \sa caCertificates(), defaultCaCertificates(), setDefaultCaCertificates()
  1554     false. If the platform doesn't support SSL, the socket will fail
  1554     false. If the platform doesn't support SSL, the socket will fail
  1555     in the connection phase.
  1555     in the connection phase.
  1556 */
  1556 */
  1557 bool QSslSocket::supportsSsl()
  1557 bool QSslSocket::supportsSsl()
  1558 {
  1558 {
  1559     return QSslSocketPrivate::ensureInitialized();
  1559     return QSslSocketPrivate::supportsSsl();
  1560 }
  1560 }
  1561 
  1561 
  1562 /*!
  1562 /*!
  1563     Starts a delayed SSL handshake for a client connection. This
  1563     Starts a delayed SSL handshake for a client connection. This
  1564     function can be called when the socket is in the \l ConnectedState
  1564     function can be called when the socket is in the \l ConnectedState