QtBase  v6.3.1
Functions | Variables
src_network_ssl_qdtls.cpp File Reference

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)
 
dtlsConnection setDtlsConfiguration (config)
 
 if (!dtls.doHandshake(&socket, dgram))
 [4] More...
 
QSslError error (QSslError::SelfSignedCertificate, cert.at(0))
 
expectedSslErrors append (error)
 
dtls ignoreVerificationErrors (expectedSslErrors)
 
dtls doHandshake (udpSocket)
 

Variables

QUdpSocket clientSocket
 [0] More...
 
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] More...
 
config setDtlsCookieVerificationEnabled (false)
 
QList< QSslCertificatecert = QSslCertificate::fromPath(QLatin1String("server-certificate.pem"))
 [5] More...
 
QList< QSslErrorexpectedSslErrors
 
QDtls dtls
 

Function Documentation

◆ append()

expectedSslErrors append ( error  )

◆ clientHello()

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

◆ doHandshake()

dtls doHandshake ( udpSocket  )

◆ error()

QSslError error ( QSslError::SelfSignedCertificate  ,
cert.  at
)

◆ if()

if ( !dtls.doHandshake &,  dgram)

[4]

[5]

Definition at line 122 of file src_network_ssl_qdtls.cpp.

Here is the call graph for this function:

◆ 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  )

◆ setPeer() [1/2]

serverDtls setPeer ( address  ,
port   
)

◆ setPeer() [2/2]

clientDtls setPeer ( address  ,
port  ,
peerName   
)

Variable Documentation

◆ address

Definition at line 61 of file src_network_ssl_qdtls.cpp.

◆ cert

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

[5]

[6]

Definition at line 129 of file src_network_ssl_qdtls.cpp.

◆ clientDtls

QDtls clientDtls

Definition at line 54 of file src_network_ssl_qdtls.cpp.

◆ clientSocket

dtlsConnection writeDatagramEncrypted & clientSocket

[0]

[1]

[2]

Definition at line 53 of file src_network_ssl_qdtls.cpp.

◆ config

auto config = QSslConfiguration::defaultDtlsConfiguration()

[3]

[4]

Definition at line 115 of file src_network_ssl_qdtls.cpp.

◆ dtls

QDtls dtls

Definition at line 134 of file src_network_ssl_qdtls.cpp.

◆ encryptedMessage

QByteArray encryptedMessage(dgramSize) ( dgramSize  )

◆ expectedSslErrors

QList<QSslError> expectedSslErrors

Definition at line 131 of file src_network_ssl_qdtls.cpp.

◆ plainText

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

Definition at line 104 of file src_network_ssl_qdtls.cpp.

◆ port

quin16 port = {}

Definition at line 62 of file src_network_ssl_qdtls.cpp.

◆ serverDtls

QDtls serverDtls

Definition at line 65 of file src_network_ssl_qdtls.cpp.

◆ serverSocket

serverDtls doHandshake& serverSocket

Definition at line 67 of file src_network_ssl_qdtls.cpp.

◆ setDtlsCookieVerificationEnabled

config setDtlsCookieVerificationEnabled(false) ( false  )