diff options
Diffstat (limited to 'src/network/ssl/qtlsbackend_p.h')
-rw-r--r-- | src/network/ssl/qtlsbackend_p.h | 64 |
1 files changed, 14 insertions, 50 deletions
diff --git a/src/network/ssl/qtlsbackend_p.h b/src/network/ssl/qtlsbackend_p.h index 79bd0c5ebf..090531014b 100644 --- a/src/network/ssl/qtlsbackend_p.h +++ b/src/network/ssl/qtlsbackend_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 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 QTLSBACKEND_P_H #define QTLSBACKEND_P_H @@ -67,7 +31,6 @@ #include <QtNetwork/qssl.h> #include <QtCore/qloggingcategory.h> -#include <QtCore/qsharedpointer.h> #include <QtCore/qnamespace.h> #include <QtCore/qobject.h> #include <QtCore/qglobal.h> @@ -94,7 +57,7 @@ class QSslKey; namespace QTlsPrivate { -class Q_NETWORK_PRIVATE_EXPORT TlsKey { +class Q_NETWORK_EXPORT TlsKey { public: virtual ~TlsKey(); @@ -131,7 +94,7 @@ public: QByteArray pemFooter() const; }; -class Q_NETWORK_PRIVATE_EXPORT X509Certificate +class Q_NETWORK_EXPORT X509Certificate { public: virtual ~X509Certificate(); @@ -188,14 +151,14 @@ using X509Pkcs12ReaderPtr = bool (*)(QIODevice *device, QSslKey *key, QSslCertif #if QT_CONFIG(ssl) // TLS over TCP. Handshake, encryption/decryption. -class Q_NETWORK_PRIVATE_EXPORT TlsCryptograph : public QObject +class Q_NETWORK_EXPORT TlsCryptograph : public QObject { public: virtual ~TlsCryptograph(); virtual void init(QSslSocket *q, QSslSocketPrivate *d) = 0; - virtual void checkSettingSslContext(QSharedPointer<QSslContext> tlsContext); - virtual QSharedPointer<QSslContext> sslContext() const; + virtual void checkSettingSslContext(std::shared_ptr<QSslContext> tlsContext); + virtual std::shared_ptr<QSslContext> sslContext() const; virtual QList<QSslError> tlsErrors() const = 0; @@ -224,7 +187,7 @@ class TlsCryptograph; #if QT_CONFIG(dtls) -class Q_NETWORK_PRIVATE_EXPORT DtlsBase +class Q_NETWORK_EXPORT DtlsBase { public: virtual ~DtlsBase(); @@ -254,7 +217,7 @@ public: }; // TLS over UDP. Handshake, encryption/decryption. -class Q_NETWORK_PRIVATE_EXPORT DtlsCryptograph : virtual public DtlsBase +class Q_NETWORK_EXPORT DtlsCryptograph : virtual public DtlsBase { public: @@ -383,8 +346,11 @@ public: static QSslCipher createCiphersuite(const QString &description, int bits, int supportedBits); static QSslCipher createCiphersuite(const QString &suiteName, QSsl::SslProtocol protocol, const QString &protocolString); - static QSslCipher createCipher(const QString &name, QSsl::SslProtocol protocol, - const QString &protocolString); + static QSslCipher createCiphersuite(const QString &name, const QString &keyExchangeMethod, + const QString &encryptionMethod, + const QString &authenticationMethod, + int bits, QSsl::SslProtocol protocol, + const QString &protocolString); // Those statics are implemented using QSslSocketPrivate (which is not exported, // unlike QTlsBackend). @@ -428,8 +394,6 @@ public: Q_DISABLE_COPY_MOVE(QTlsBackend) }; -Q_DECLARE_LOGGING_CATEGORY(lcTlsBackend) - #define QTlsBackend_iid "org.qt-project.Qt.QTlsBackend" Q_DECLARE_INTERFACE(QTlsBackend, QTlsBackend_iid); |