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
qx509_base_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QX509CERTIFICATE_BASE_P_H
6#define QX509CERTIFICATE_BASE_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtNetwork/private/qtnetworkglobal_p.h>
20
21#include <QtNetwork/private/qtlsbackend_p.h>
22
23#include <QtNetwork/qssl.h>
24
25#include <QtCore/qbytearray.h>
26#include <QtCore/qstring.h>
27#include <QtCore/qglobal.h>
28#include <QtCore/qlist.h>
29
31
32namespace QTlsPrivate {
33
35{
36public:
37 bool isNull() const override;
38 QByteArray version() const override;
39 QByteArray serialNumber() const override;
40 QStringList issuerInfo(QSslCertificate::SubjectInfo info) const override;
41 QStringList issuerInfo(const QByteArray &attribute) const override;
42 QStringList subjectInfo(QSslCertificate::SubjectInfo info) const override;
43 QStringList subjectInfo(const QByteArray &attribute) const override;
44 QList<QByteArray> subjectInfoAttributes() const override;
45 QList<QByteArray> issuerInfoAttributes() const override;
46 QDateTime effectiveDate() const override;
47 QDateTime expiryDate() const override;
48
49 qsizetype numberOfExtensions() const override;
50 QString oidForExtension(qsizetype index) const override;
51 QString nameForExtension(qsizetype index) const override;
52 QVariant valueForExtension(qsizetype index) const override;
53 bool isExtensionCritical(qsizetype index) const override;
54 bool isExtensionSupported(qsizetype index) const override;
55
56 static QByteArray subjectInfoToString(QSslCertificate::SubjectInfo info);
57 static bool matchLineFeed(const QByteArray &pem, int *offset);
58
59protected:
60 bool validIndex(qsizetype index) const
61 {
62 return index >= 0 && index < extensions.size();
63 }
64
65 bool null = true;
68
73
82
84};
85
86} // namespace QTlsPrivate
87
88QT_END_NAMESPACE
89
90#endif // QX509CERTIFICATE_BASE_P_H
Definition qlist.h:80
QList< QByteArray > issuerInfoAttributes() const override
QList< X509CertificateExtension > extensions
QByteArray version() const override
bool isExtensionSupported(qsizetype index) const override
QStringList issuerInfo(QSslCertificate::SubjectInfo info) const override
QDateTime expiryDate() const override
bool validIndex(qsizetype index) const
QStringList issuerInfo(const QByteArray &attribute) const override
QMultiMap< QByteArray, QString > subjectInfoEntries
QString nameForExtension(qsizetype index) const override
QString oidForExtension(qsizetype index) const override
QStringList subjectInfo(const QByteArray &attribute) const override
QMultiMap< QByteArray, QString > issuerInfoEntries
QDateTime effectiveDate() const override
static QByteArray subjectInfoToString(QSslCertificate::SubjectInfo info)
QList< QByteArray > subjectInfoAttributes() const override
QStringList subjectInfo(QSslCertificate::SubjectInfo info) const override
QVariant valueForExtension(qsizetype index) const override
QByteArray serialNumber() const override
static bool matchLineFeed(const QByteArray &pem, int *offset)
bool isExtensionCritical(qsizetype index) const override
qsizetype numberOfExtensions() const override
bool isNull() const override
QMultiMap< QSsl::AlternativeNameEntryType, QString > subjectAlternativeNames() const override
QByteArray toDer() const override
static QList< QSslCertificate > certificatesFromDer(const QByteArray &der, int count)
QMultiMap< QSsl::AlternativeNameEntryType, QString > saNames
size_t hash(size_t seed) const noexcept override
bool parseExtension(const QByteArray &data, X509CertificateExtension &extension)
bool isEqual(const X509Certificate &rhs) const override
QString toText() const override
Qt::HANDLE handle() const override
bool parse(const QByteArray &data)
QByteArray toPem() const override
static QList< QSslCertificate > certificatesFromPem(const QByteArray &pem, int count)
SupportedFeature
Enumerates possible features that a TLS backend supports.
Definition qssl.h:146
ImplementedClass
Enumerates classes that a TLS backend implements.
Definition qssl.h:134
AlertLevel
Describes the level of an alert message.
Definition qssl.h:88
SslProtocol
Describes the protocol of the cipher.
Definition qssl.h:52
Namespace containing onternal types that TLS backends implement.