Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsslserver.h
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// Copyright (C) 2016 Kurt Pattyn <pattyn.kurt@gmail.com>.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QSSLSERVER_H
6#define QSSLSERVER_H
7
8#include <QtNetwork/QTcpServer>
9
11
12#include <QtNetwork/QSslError>
13#include <QtNetwork/QSslConfiguration>
14#include <QtNetwork/QSslPreSharedKeyAuthenticator>
15#include <QtNetwork/QSslSocket>
16
17#include <QtCore/QList>
18
20
21class QSslSocket;
23
24class Q_NETWORK_EXPORT QSslServer : public QTcpServer
25{
27 Q_DISABLE_COPY_MOVE(QSslServer)
28
29public:
30 explicit QSslServer(QObject *parent = nullptr);
31 ~QSslServer() override;
32
33 void setSslConfiguration(const QSslConfiguration &sslConfiguration);
34 QSslConfiguration sslConfiguration() const;
35
36 void setHandshakeTimeout(int timeout);
37 int handshakeTimeout() const;
38
40 void sslErrors(QSslSocket *socket, const QList<QSslError> &errors);
44 QSslPreSharedKeyAuthenticator *authenticator);
46 QSsl::AlertType type, const QString &description);
48 QSsl::AlertType type, const QString &description);
51
52protected:
53 void incomingConnection(qintptr socket) override;
54
55private:
56 Q_DECLARE_PRIVATE(QSslServer)
57};
58
60
61#endif // QSSLSERVER_H
SocketError
This enum describes the socket errors that can occur.
\inmodule QtCore
Definition qobject.h:103
The QSslConfiguration class holds the configuration and state of an SSL connection.
The QSslError class provides an SSL error.
Definition qsslerror.h:21
The QSslPreSharedKeyAuthenticator class provides authentication data for pre shared keys (PSK) cipher...
\inmodule QtNetwork
Definition qsslserver.h:25
void peerVerifyError(QSslSocket *socket, const QSslError &error)
QSslServer can emit this signal several times during the SSL handshake, before encryption has been es...
void errorOccurred(QSslSocket *socket, QAbstractSocket::SocketError error)
This signal is emitted after an error occurred during handshake.
void handshakeInterruptedOnError(QSslSocket *socket, const QSslError &error)
QSslServer emits this signal if a certificate verification error was found by socket and if early err...
void alertSent(QSslSocket *socket, QSsl::AlertLevel level, QSsl::AlertType type, const QString &description)
QSslServer emits this signal if an alert message was sent from socket to a peer.
void alertReceived(QSslSocket *socket, QSsl::AlertLevel level, QSsl::AlertType type, const QString &description)
QSslServer emits this signal if an alert message was received by the socket from a peer.
void startedEncryptionHandshake(QSslSocket *socket)
This signal is emitted when the client, connected to socket, initiates the TLS handshake.
void sslErrors(QSslSocket *socket, const QList< QSslError > &errors)
QSslServer emits this signal after the SSL handshake to indicate that one or more errors have occurre...
void preSharedKeyAuthenticationRequired(QSslSocket *socket, QSslPreSharedKeyAuthenticator *authenticator)
QSslServer emits this signal when socket negotiates a PSK ciphersuite, and therefore PSK authenticati...
The QSslSocket class provides an SSL encrypted socket for both clients and servers.
Definition qsslsocket.h:29
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
The QTcpServer class provides a TCP-based server.
Definition qtcpserver.h:22
AlertLevel
Describes the level of an alert message.
Definition qssl.h:86
AlertType
Enumerates possible codes that an alert message can have.
Definition qssl.h:93
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
GLenum GLuint GLint level
GLbitfield GLuint64 timeout
[4]
GLenum type
#define QT_REQUIRE_CONFIG(feature)
#define Q_OBJECT
#define Q_SIGNALS
ptrdiff_t qintptr
Definition qtypes.h:166
QTcpSocket * socket
[1]
sslSocket setSslConfiguration(config)