![]() |
Qt 6.x
The Qt SDK
|
Go to the source code of this file.
Functions | |
| clientDtls | setPeer (address, port, peerName) |
| QByteArray | clientHello (serverSocket.pendingDatagramSize(), Qt::Uninitialized) |
| serverSocket | readDatagram (clientHello.data(), clientHello.size(), &address, &port) |
| serverDtls | setPeer (address, port) |
| socket | readDatagram (encryptedMessage.data(), dgramSize) |
| config | setDtlsCookieVerificationEnabled (false) |
| dtlsConnection | setDtlsConfiguration (config) |
| if (!dtls.doHandshake(&socket, dgram)) | |
| [4] | |
| QSslError | error (QSslError::SelfSignedCertificate, cert.at(0)) |
| expectedSslErrors | append (error) |
| dtls | ignoreVerificationErrors (expectedSslErrors) |
| dtls | doHandshake (udpSocket) |
Variables | |
| QUdpSocket | clientSocket |
| [0] | |
| QDtls | clientDtls |
| QHostAddress | address |
| quin16 | port = {} |
| QDtls | serverDtls |
| serverDtls doHandshake & | serverSocket |
| QByteArray | encryptedMessage (dgramSize) |
| const QByteArray | plainText = dtlsConnection.decryptDatagram(&socket, encryptedMessage) |
| auto | config = QSslConfiguration::defaultDtlsConfiguration() |
| [3] | |
| QList< QSslCertificate > | cert = QSslCertificate::fromPath("server-certificate.pem"_L1) |
| [5] | |
| QList< QSslError > | expectedSslErrors |
| QDtls | dtls |
| expectedSslErrors append | ( | error | ) |
| QByteArray clientHello | ( | serverSocket. | pendingDatagramSize(), |
| Qt::Uninitialized | |||
| ) |
| dtls doHandshake | ( | udpSocket | ) |
| QSslError error | ( | QSslError::SelfSignedCertificate | , |
| cert. | at0 | ||
| ) |
| if | ( | !dtls.doHandshake &, | dgram | ) |
[4]
[5]
Definition at line 76 of file src_network_ssl_qdtls.cpp.
References dtls, QDtls::dtlsError(), PeerVerificationError, and socket.
Here is the call graph for this function:| dtls ignoreVerificationErrors | ( | expectedSslErrors | ) |
| serverSocket readDatagram | ( | clientHello. | data(), |
| clientHello. | size(), | ||
| & | address, | ||
| & | port | ||
| ) |
| socket readDatagram | ( | encryptedMessage. | data(), |
| dgramSize | |||
| ) |
| dtlsConnection setDtlsConfiguration | ( | config | ) |
| serverDtls setPeer | ( | address | , |
| port | |||
| ) |
| clientDtls setPeer | ( | address | , |
| port | , | ||
| peerName | |||
| ) |
Definition at line 15 of file src_network_ssl_qdtls.cpp.
| QList<QSslCertificate> cert = QSslCertificate::fromPath("server-certificate.pem"_L1) |
| QDtls clientDtls |
Definition at line 8 of file src_network_ssl_qdtls.cpp.
| dtlsConnection writeDatagramEncrypted & clientSocket |
| auto config = QSslConfiguration::defaultDtlsConfiguration() |
| QDtls dtls |
Definition at line 88 of file src_network_ssl_qdtls.cpp.
Referenced by if(), dtlsbio::q_dgram_ctrl(), dtlsbio::q_dgram_read(), dtlsbio::q_dgram_write(), dtlscallbacks::q_generate_cookie_callback(), dtlscallbacks::q_PSK_client_callback(), dtlscallbacks::q_PSK_server_callback(), and dtlscallbacks::q_X509DtlsCallback().
| QByteArray encryptedMessage(dgramSize) | ( | dgramSize | ) |
Definition at line 85 of file src_network_ssl_qdtls.cpp.
| const QByteArray plainText = dtlsConnection.decryptDatagram(&socket, encryptedMessage) |
Definition at line 58 of file src_network_ssl_qdtls.cpp.
Referenced by QTextDocumentFragment::fromPlainText().
| quin16 port = {} |
Definition at line 16 of file src_network_ssl_qdtls.cpp.
| QDtls serverDtls |
Definition at line 19 of file src_network_ssl_qdtls.cpp.
| serverDtls doHandshake& serverSocket |
Definition at line 21 of file src_network_ssl_qdtls.cpp.
Referenced by connectToHostEncrypted(), and QLowEnergyControllerPrivateBluez::startAdvertising().