Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
src_network_ssl_qdtls.cpp File Reference

(05fc3aef53348fb58be6308076e000825b704e58)

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 doHandshakeserverSocket
QByteArray encryptedMessage (dgramSize)
const QByteArray plainText = dtlsConnection.decryptDatagram(&socket, encryptedMessage)
auto config = QSslConfiguration::defaultDtlsConfiguration()
 [3]
QList< QSslCertificatecert = QSslCertificate::fromPath("server-certificate.pem"_L1)
 [5]
QList< QSslErrorexpectedSslErrors
QDtls dtls

Function Documentation

◆ append()

◆ clientHello()

QByteArray clientHello ( serverSocket. pendingDatagramSize(),
Qt::Uninitialized  )

◆ doHandshake()

dtls doHandshake ( udpSocket )

◆ error()

◆ if()

if ( !dtls.doHandshake &, dgram)

[4]

[5]

Definition at line 76 of file src_network_ssl_qdtls.cpp.

◆ ignoreVerificationErrors()

dtls ignoreVerificationErrors ( expectedSslErrors )

◆ readDatagram() [1/2]

serverSocket readDatagram ( clientHello. data(),
clientHello. size(),
& address,
& port )

◆ readDatagram() [2/2]

socket readDatagram ( encryptedMessage. data(),
dgramSize  )

◆ setDtlsConfiguration()

dtlsConnection setDtlsConfiguration ( config )

◆ setDtlsCookieVerificationEnabled()

config setDtlsCookieVerificationEnabled ( false )

◆ setPeer() [1/2]

serverDtls setPeer ( address ,
port  )

◆ setPeer() [2/2]

clientDtls setPeer ( address ,
port ,
peerName  )

Variable Documentation

◆ address

Definition at line 15 of file src_network_ssl_qdtls.cpp.

◆ cert

QList<QSslCertificate> cert = QSslCertificate::fromPath("server-certificate.pem"_L1)

[5]

[6]

Definition at line 83 of file src_network_ssl_qdtls.cpp.

◆ clientDtls

QDtls clientDtls

Definition at line 8 of file src_network_ssl_qdtls.cpp.

◆ clientSocket

dtlsConnection writeDatagramEncrypted & clientSocket

[0]

[1]

[2]

Definition at line 7 of file src_network_ssl_qdtls.cpp.

◆ config

auto config = QSslConfiguration::defaultDtlsConfiguration()

[3]

[4]

Definition at line 69 of file src_network_ssl_qdtls.cpp.

◆ dtls

QDtls dtls

Definition at line 88 of file src_network_ssl_qdtls.cpp.

◆ encryptedMessage

QByteArray encryptedMessage ( dgramSize )

◆ expectedSslErrors

QList<QSslError> expectedSslErrors

Definition at line 85 of file src_network_ssl_qdtls.cpp.

◆ plainText

const QByteArray plainText = dtlsConnection.decryptDatagram(&socket, encryptedMessage)

Definition at line 58 of file src_network_ssl_qdtls.cpp.

◆ port

quin16 port = {}

Definition at line 16 of file src_network_ssl_qdtls.cpp.

◆ serverDtls

QDtls serverDtls

Definition at line 19 of file src_network_ssl_qdtls.cpp.

◆ serverSocket

serverDtls doHandshake & serverSocket

Definition at line 21 of file src_network_ssl_qdtls.cpp.