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 Q_AUTOTEST_EXPORT static bool peerSessionWasShared(const QSslConfiguration &configuration);
85
86 QSsl::SslOptions sslOptions;
87
88 static const QSsl::SslOptions defaultSslOptions;
89
90 QList<QSslEllipticCurve> ellipticCurves;
91
92 QSslDiffieHellmanParameters dhParams;
93
94 QMap<QByteArray, QVariant> backendConfig;
95
96 QByteArray sslSession;
97 int sslSessionTicketLifeTimeHint;
98
99 QSslKey ephemeralServerKey;
100
101 QByteArray preSharedKeyIdentityHint;
102
103 QList<QByteArray> nextAllowedProtocols;
104 QByteArray nextNegotiatedProtocol;
105 QSslConfiguration::NextProtocolNegotiationStatus nextProtocolNegotiationStatus;
106
107 QList<QSslKeyingMaterial> keyingMaterial;
108
109#if QT_CONFIG(dtls)
110 bool dtlsCookieEnabled = true;
111#else
112 const bool dtlsCookieEnabled = false;
113#endif // dtls
114
115#if QT_CONFIG(ocsp)
116 bool ocspStaplingEnabled = false;
117#else
118 const bool ocspStaplingEnabled = false;
119#endif
120
121#if QT_CONFIG(openssl)
122 bool reportFromCallback = false;
123 bool missingCertIsFatal = false;
124#else
125 const bool reportFromCallback = false;
126 const bool missingCertIsFatal = false;
127#endif // openssl
128
129 // in qsslsocket.cpp:
130 static QSslConfiguration defaultConfiguration();
131 static void setDefaultConfiguration(const QSslConfiguration &configuration);
132 static void deepCopyDefaultConfiguration(QSslConfigurationPrivate *config);
133
134 static QSslConfiguration defaultDtlsConfiguration();
135 static void setDefaultDtlsConfiguration(const QSslConfiguration &configuration);
136};
137
138// implemented here for inlining purposes
139inline QSslConfiguration::QSslConfiguration(QSslConfigurationPrivate *dd)
140 : d(dd)
141{
142}
143
144QT_END_NAMESPACE
145
146#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