summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslsocket.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/ssl/qsslsocket.h')
-rw-r--r--src/network/ssl/qsslsocket.h63
1 files changed, 17 insertions, 46 deletions
diff --git a/src/network/ssl/qsslsocket.h b/src/network/ssl/qsslsocket.h
index 3408e36197..3ed1bc45cc 100644
--- a/src/network/ssl/qsslsocket.h
+++ b/src/network/ssl/qsslsocket.h
@@ -1,41 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtNetwork module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QSSLSOCKET_H
@@ -57,7 +21,6 @@ class QDir;
class QSslCipher;
class QSslCertificate;
class QSslConfiguration;
-class QSslEllipticCurve;
class QSslPreSharedKeyAuthenticator;
class QOcspResponse;
@@ -72,6 +35,7 @@ public:
SslClientMode,
SslServerMode
};
+ Q_ENUM(SslMode)
enum PeerVerifyMode {
VerifyNone,
@@ -79,6 +43,7 @@ public:
VerifyPeer,
AutoVerifyPeer
};
+ Q_ENUM(PeerVerifyMode)
explicit QSslSocket(QObject *parent = nullptr);
~QSslSocket();
@@ -118,8 +83,6 @@ public:
bool canReadLine() const override;
void close() override;
bool atEnd() const override;
- bool flush(); // ### Qt6: remove me (implementation moved to private flush())
- void abort();
// From QAbstractSocket:
void setReadBufferSize(qint64 size) override;
@@ -166,6 +129,16 @@ public:
static long sslLibraryBuildVersionNumber();
static QString sslLibraryBuildVersionString();
+ static QList<QString> availableBackends();
+ static QString activeBackend();
+ static bool setActiveBackend(const QString &backendName);
+ static QList<QSsl::SslProtocol> supportedProtocols(const QString &backendName = {});
+ static bool isProtocolSupported(QSsl::SslProtocol protocol, const QString &backendName = {});
+ static QList<QSsl::ImplementedClass> implementedClasses(const QString &backendName = {});
+ static bool isClassImplemented(QSsl::ImplementedClass cl, const QString &backendName = {});
+ static QList<QSsl::SupportedFeature> supportedFeatures(const QString &backendName = {});
+ static bool isFeatureSupported(QSsl::SupportedFeature feat, const QString &backendName = {});
+
void ignoreSslErrors(const QList<QSslError> &errors);
void continueInterruptedHandshake();
@@ -188,11 +161,13 @@ Q_SIGNALS:
protected:
qint64 readData(char *data, qint64 maxlen) override;
+ qint64 skipData(qint64 maxSize) override;
qint64 writeData(const char *data, qint64 len) override;
private:
Q_DECLARE_PRIVATE(QSslSocket)
- Q_DISABLE_COPY(QSslSocket)
+ Q_DISABLE_COPY_MOVE(QSslSocket)
+
Q_PRIVATE_SLOT(d_func(), void _q_connectedSlot())
Q_PRIVATE_SLOT(d_func(), void _q_hostFoundSlot())
Q_PRIVATE_SLOT(d_func(), void _q_disconnectedSlot())
@@ -206,10 +181,6 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_flushWriteBuffer())
Q_PRIVATE_SLOT(d_func(), void _q_flushReadBuffer())
Q_PRIVATE_SLOT(d_func(), void _q_resumeImplementation())
-#if defined(Q_OS_WIN) && !QT_CONFIG(schannel)
- Q_PRIVATE_SLOT(d_func(), void _q_caRootLoaded(QSslCertificate,QSslCertificate))
-#endif
- friend class QSslSocketBackendPrivate;
};
#endif // QT_NO_SSL