4#ifndef QDTLS_OPENSSL_P_H
5#define QDTLS_OPENSSL_P_H
7#include <QtNetwork/private/qtnetworkglobal_p.h>
14#include "../shared/qdtls_base_p.h"
16#include <QtNetwork/private/qdtls_p.h>
18#include <QtNetwork/qsslpresharedkeyauthenticator.h>
19#include <QtNetwork/qhostaddress.h>
21#include <QtCore/qsharedpointer.h>
22#include <QtCore/qbytearray.h>
23#include <QtCore/qglobal.h>
24#include <QtCore/qlist.h>
26#include <openssl/ossl_typ.h>
85#ifdef QT_CRYPTOGRAPHICHASH_ONLY_SHA1
161 unsigned char *psk,
unsigned max_psk_len);
163 unsigned max_psk_len);
168 void storePeerCertificates();
169 bool tlsErrorsWereIgnored()
const;
170 void fetchNegotiatedParameters();
171 void reportTimeout();
180 struct TimeoutHandler :
QObject
182 TimeoutHandler() =
default;
184 void start(
int hintMs = 0);
185 void doubleTimeout();
186 void resetTimeout() {timeoutMs = 1000;}
191 int timeoutMs = 1000;
201 bool connectionEncrypted =
false;
205 bool connectionWasShutdown =
false;
void abortHandshake(QUdpSocket *socket) override
virtual QDtls::HandshakeState state() const override
QHostAddress peerAddress() const override
QSslSocket::SslMode cryptographMode() const override
void ignoreVerificationErrors(const QList< QSslError > &errorsToIgnore) override
QSslCipher dtlsSessionCipher() const override
bool startHandshake(QUdpSocket *socket, const QByteArray &datagram) override
bool resumeHandshake(QUdpSocket *socket) override
unsigned pskServerCallback(const char *identity, unsigned char *psk, unsigned max_psk_len)
bool handleTimeout(QUdpSocket *socket) override
virtual void setDtlsMtuHint(quint16 mtu) override
quint16 peerPort() const override
qint64 writeDatagramEncrypted(QUdpSocket *socket, const QByteArray &datagram) override
void sendShutdownAlert(QUdpSocket *socket) override
unsigned pskClientCallback(const char *hint, char *identity, unsigned max_identity_len, unsigned char *psk, unsigned max_psk_len)
void setPeer(const QHostAddress &addr, quint16 port, const QString &name) override
QByteArray decryptDatagram(QUdpSocket *socket, const QByteArray &tlsdgram) override
QSsl::SslProtocol dtlsSessionProtocol() const override
virtual bool isConnectionEncrypted() const override
bool continueHandshake(QUdpSocket *socket, const QByteArray &datagram) override
QList< QSslError > peerVerificationErrors() const override
void setPeerVerificationName(const QString &name) override
virtual quint16 dtlsMtuHint() const override
QString peerVerificationName() const override
This class provides encryption for UDP sockets.
The QHostAddress class provides an IP address.
The QSslCipher class represents an SSL cryptographic cipher.
The QSslPreSharedKeyAuthenticator class provides authentication data for pre shared keys (PSK) cipher...
SslMode
Describes the connection modes available for QSslSocket.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool init(QDtlsBasePrivate *dtlsBase, QUdpSocket *socket, const QHostAddress &remote, quint16 port, const QByteArray &receivedMessage)
QCryptographicHash::Algorithm hashAlgorithm
QDtlsPrivateOpenSSL * dtlsPrivate
TlsConnection tlsConnection
std::shared_ptr< QSslContext > TlsContext
QHostAddress remoteAddress
QList< QSslErrorEntry > x509Errors
SslProtocol
Describes the protocol of the cipher.
Combined button and popup list for selecting options.
Namespace containing onternal types that TLS backends implement.
#define QT_WARNING_DISABLE_MSVC(number)
GLuint GLuint64EXT address
GLdouble GLdouble GLdouble GLdouble q
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
#define QT_REQUIRE_CONFIG(feature)