8#include <QtNetwork/qtnetworkglobal.h>
9#include <QtCore/qlist.h>
11# include <QtNetwork/qtcpsocket.h>
12# include <QtNetwork/qsslerror.h>
55 bool setSocketDescriptor(
qintptr socketDescriptor, SocketState
state = ConnectedState,
56 OpenMode openMode = ReadWrite)
override;
74 int peerVerifyDepth()
const;
75 void setPeerVerifyDepth(
int depth);
78 void setPeerVerifyName(
const QString &hostName);
81 qint64 bytesAvailable()
const override;
82 qint64 bytesToWrite()
const override;
83 bool canReadLine()
const override;
84 void close()
override;
85 bool atEnd()
const override;
91 qint64 encryptedBytesAvailable()
const;
92 qint64 encryptedBytesToWrite()
const;
99 void setLocalCertificateChain(
const QList<QSslCertificate> &localChain);
100 QList<QSslCertificate> localCertificateChain()
const;
106 QList<QSslCertificate> peerCertificateChain()
const;
109 QList<QOcspResponse> ocspResponses()
const;
118 bool waitForConnected(
int msecs = 30000)
override;
119 bool waitForEncrypted(
int msecs = 30000);
121 bool waitForBytesWritten(
int msecs = 30000)
override;
122 bool waitForDisconnected(
int msecs = 30000)
override;
124 QList<QSslError> sslHandshakeErrors()
const;
126 static bool supportsSsl();
127 static long sslLibraryVersionNumber();
128 static QString sslLibraryVersionString();
129 static long sslLibraryBuildVersionNumber();
130 static QString sslLibraryBuildVersionString();
132 static QList<QString> availableBackends();
133 static QString activeBackend();
137 static QList<QSsl::ImplementedClass> implementedClasses(
const QString &
backendName = {});
139 static QList<QSsl::SupportedFeature> supportedFeatures(
const QString &
backendName = {});
143 void continueInterruptedHandshake();
146 void startClientEncryption();
147 void startServerEncryption();
The QAbstractSocket class provides the base functionality common to all socket types.
SocketState
This enum describes the different states in which a socket can be.
SocketError
This enum describes the socket errors that can occur.
virtual void connectToHost(const QString &hostName, quint16 port, OpenMode mode=ReadWrite, NetworkLayerProtocol protocol=AnyIPProtocol)
Attempts to make a connection to hostName on the given port.
This class represents Online Certificate Status Protocol response.
The QSslCertificate class provides a convenient API for an X509 certificate.
The QSslCipher class represents an SSL cryptographic cipher.
The QSslConfiguration class holds the configuration and state of an SSL connection.
The QSslError class provides an SSL error.
The QSslKey class provides an interface for private and public keys.
The QSslPreSharedKeyAuthenticator class provides authentication data for pre shared keys (PSK) cipher...
The QSslSocket class provides an SSL encrypted socket for both clients and servers.
void sslErrors(const QList< QSslError > &errors)
QSslSocket emits this signal after the SSL handshake to indicate that one or more errors have occurre...
void encryptedBytesWritten(qint64 totalBytes)
void alertSent(QSsl::AlertLevel level, QSsl::AlertType type, const QString &description)
QSslSocket emits this signal if an alert message was sent to a peer.
void peerVerifyError(const QSslError &error)
SslMode
Describes the connection modes available for QSslSocket.
void newSessionTicketReceived()
void preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator *authenticator)
void encrypted()
This signal is emitted when QSslSocket enters encrypted mode.
void alertReceived(QSsl::AlertLevel level, QSsl::AlertType type, const QString &description)
QSslSocket emits this signal if an alert message was received from a peer.
void handshakeInterruptedOnError(const QSslError &error)
QSslSocket emits this signal if a certificate verification error was found and if early error reporti...
void modeChanged(QSslSocket::SslMode newMode)
This signal is emitted when QSslSocket changes from \l QSslSocket::UnencryptedMode to either \l QSslS...
\macro QT_RESTRICTED_CAST_FROM_ASCII
The QTcpSocket class provides a TCP socket.
SupportedFeature
Enumerates possible features that a TLS backend supports.
ImplementedClass
Enumerates classes that a TLS backend implements.
AlertLevel
Describes the level of an alert message.
KeyAlgorithm
Describes the different key algorithms supported by QSslKey.
EncodingFormat
Describes supported encoding formats for certificates and keys.
AlertType
Enumerates possible codes that an alert message can have.
SslProtocol
Describes the protocol of the cipher.
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
static bool isEncrypted(const my_mach_header *header)
GLint GLenum GLsizei GLsizei GLsizei depth
GLenum GLuint GLint level
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei GLsizei GLenum format
sock connectToHost(url.host(), url.port(80))
device waitForReadyRead(deadline)
void writeData(const QByteArray &data)
reply ignoreSslErrors(expectedSslErrors)
socket disconnectFromHost()
[0]
config setProtocol(QSsl::TlsV1_2)
sslSocket setSslConfiguration(config)
socket connectToHostEncrypted("imap.example.com", 993)