![]() |
Qt 6.x
The Qt SDK
|
Go to the source code of this file.
Functions | |
| connect (socket, &QSslSocket::encrypted, this, &Receiver::ready) | |
| socket | connectToHostEncrypted ("imap.example.com", 993) |
| socket | connectToHostEncrypted ("http.example.com", 443) |
| if (!socket.waitForEncrypted()) | |
| socket | write ("GET / HTTP/1.0\r\n\r\n") |
| while (socket.waitForReadyRead()) qDebug()<< socket.readAll().data() | |
| socket | connectToHostEncrypted ("imap", 993) |
| [3] | |
| socket | write ("1 CAPABILITY\r\n") |
| if (socket->waitForEncrypted(1000)) qDebug("Encrypted!") | |
| QSslError | error (QSslError::SelfSignedCertificate, cert.at(0)) |
| expectedSslErrors | append (error) |
| socket | ignoreSslErrors (expectedSslErrors) |
| socket | connectToHostEncrypted ("server.tld", 443) |
Variables | |
| QSslSocket * | socket = new QSslSocket(this) |
| [0] | |
| QList< QSslCertificate > | cert = QSslCertificate::fromPath("server-certificate.pem"_L1) |
| [5] | |
| QList< QSslError > | expectedSslErrors |
| expectedSslErrors append | ( | error | ) |
| connect | ( | socket | , |
| &QSslSocket::encrypted | , | ||
| this | , | ||
| &Receiver::ready | |||
| ) |
| socket connectToHostEncrypted | ( | "http.example.com" | , |
| 443 | |||
| ) |
| socket connectToHostEncrypted | ( | "imap" | , |
| 993 | |||
| ) |
[3]
[5]
| socket connectToHostEncrypted | ( | "imap.example.com" | , |
| 993 | |||
| ) |
References connect(), QSslSocket::encrypted(), and serverSocket.
Here is the call graph for this function:| socket connectToHostEncrypted | ( | "server.tld" | , |
| 443 | |||
| ) |
| QSslError error | ( | QSslError::SelfSignedCertificate | , |
| cert. | at0 | ||
| ) |
| if | ( | !socket. | waitForEncrypted() | ) |
Definition at line 32 of file src_network_ssl_qsslsocket.cpp.
References QIODevice::errorString(), qDebug, and socket.
Here is the call graph for this function:| if | ( | socket-> | waitForEncrypted1000 | ) |
Definition at line 10 of file src_network_socket_qsctpsocket.cpp.
| socket ignoreSslErrors | ( | expectedSslErrors | ) |
| while | ( | socket. | waitForReadyRead() | ) |
| socket write | ( | "1 CAPABILITY\r\n" | ) |
| socket write | ( | "GET / HTTP/1.0\r\n\r\n" | ) |
| QList<QSslCertificate> cert = QSslCertificate::fromPath("server-certificate.pem"_L1) |
Definition at line 61 of file src_network_ssl_qsslsocket.cpp.
| QSslSocket socket = new QSslSocket(this) |