Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsslconfiguration_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// Copyright (C) 2014 BlackBerry Limited. All rights reserved.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4// Qt-Security score:significant reason:default
5
6/****************************************************************************
7**
8** In addition, as a special exception, the copyright holders listed above give
9** permission to link the code of its release of Qt with the OpenSSL project's
10** "OpenSSL" library (or modified versions of the "OpenSSL" library that use the
11** same license as the original version), and distribute the linked executables.
12**
13** You must comply with the GNU General Public License version 2 in all
14** respects for all of the code used other than the "OpenSSL" code. If you
15** modify this file, you may extend this exception to your version of the file,
16** but you are not obligated to do so. If you do not wish to do so, delete
17** this exception statement from your version of this file.
18**
19****************************************************************************/
20
21#ifndef QSSLCONFIGURATION_P_H
22#define QSSLCONFIGURATION_P_H
23
24//
25// W A R N I N G
26// -------------
27//
28// This file is not part of the Qt API. It exists for the convenience
29// of the QSslSocket API. This header file may change from
30// version to version without notice, or even be removed.
31//
32// We mean it.
33//
34
35#include <QtCore/qmap.h>
36#include <QtNetwork/private/qtnetworkglobal_p.h>
38#include "qlist.h"
40#include "qsslcipher.h"
41#include "qsslkey.h"
45
46QT_BEGIN_NAMESPACE
47
48class QSslConfigurationPrivate: public QSharedData
49{
50public:
51 QSslConfigurationPrivate()
52 : sessionProtocol(QSsl::UnknownProtocol),
53 protocol(QSsl::SecureProtocols),
54 peerVerifyMode(QSslSocket::AutoVerifyPeer),
55 peerVerifyDepth(0),
56 allowRootCertOnDemandLoading(true),
57 peerSessionShared(false),
58 sslOptions(QSslConfigurationPrivate::defaultSslOptions),
59 dhParams(QSslDiffieHellmanParameters::defaultParameters()),
60 sslSessionTicketLifeTimeHint(-1),
61 ephemeralServerKey(),
62 preSharedKeyIdentityHint(),
63 nextProtocolNegotiationStatus(QSslConfiguration::NextProtocolNegotiationNone),
64 keyingMaterial()
65 { }
66
67 QSslCertificate peerCertificate;
68 QList<QSslCertificate> peerCertificateChain;
69
70 QList<QSslCertificate> localCertificateChain;
71
72 QSslKey privateKey;
73 QSslCipher sessionCipher;
74 QSsl::SslProtocol sessionProtocol;
75 QList<QSslCipher> ciphers;
76 QList<QSslCertificate> caCertificates;
77
78 QSsl::SslProtocol protocol;
79 QSslSocket::PeerVerifyMode peerVerifyMode;
80 int peerVerifyDepth;
81 bool allowRootCertOnDemandLoading;
82 bool peerSessionShared;
83
84 QSsl::SslOptions sslOptions;
85
86 static const QSsl::SslOptions defaultSslOptions;
87
88 QList<QSslEllipticCurve> ellipticCurves;
89
90 QSslDiffieHellmanParameters dhParams;
91
92 QMap<QByteArray, QVariant> backendConfig;
93
94 QByteArray sslSession;
95 int sslSessionTicketLifeTimeHint;
96
97 QSslKey ephemeralServerKey;
98
99 QByteArray preSharedKeyIdentityHint;
100
101 QList<QByteArray> nextAllowedProtocols;
102 QByteArray nextNegotiatedProtocol;
103 QSslConfiguration::NextProtocolNegotiationStatus nextProtocolNegotiationStatus;
104
105 QList<QSslKeyingMaterial> keyingMaterial;
106
107#if QT_CONFIG(dtls)
108 bool dtlsCookieEnabled = true;
109#else
110 const bool dtlsCookieEnabled = false;
111#endif // dtls
112
113#if QT_CONFIG(ocsp)
114 bool ocspStaplingEnabled = false;
115#else
116 const bool ocspStaplingEnabled = false;
117#endif
118
119#if QT_CONFIG(openssl)
120 bool reportFromCallback = false;
121 bool missingCertIsFatal = false;
122#else
123 const bool reportFromCallback = false;
124 const bool missingCertIsFatal = false;
125#endif // openssl
126
127 // in qsslsocket.cpp:
128 static QSslConfiguration defaultConfiguration();
129 static void setDefaultConfiguration(const QSslConfiguration &configuration);
130 static void deepCopyDefaultConfiguration(QSslConfigurationPrivate *config);
131
132 static QSslConfiguration defaultDtlsConfiguration();
133 static void setDefaultDtlsConfiguration(const QSslConfiguration &configuration);
134};
135
136// implemented here for inlining purposes
137inline QSslConfiguration::QSslConfiguration(QSslConfigurationPrivate *dd)
138 : d(dd)
139{
140}
141
142QT_END_NAMESPACE
143
144#endif
This class represents Online Certificate Status Protocol response.
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.
Definition qsslsocket.h:30
Combined button and popup list for selecting options.
Namespace containing onternal types that TLS backends implement.
static QT_BEGIN_NAMESPACE QString msgUnsupportedMulticastAddress()
Definition qdtls.cpp:304
QT_REQUIRE_CONFIG(liburing)
QOcspRevocationReason