Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qtlskey_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
4#ifndef QTLSKEY_BASE_P_H
5#define QTLSKEY_BASE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtNetwork/private/qtnetworkglobal_p.h>
19
20#include <QtNetwork/private/qtlsbackend_p.h>
21
22#include <QtNetwork/qssl.h>
23
24#include <QtCore/qglobal.h>
25
27
28namespace QTlsPrivate {
29
30class TlsKeyBase : public TlsKey
31{
32public:
38
39 bool isNull() const override
40 {
41 return keyIsNull;
42 }
43 KeyType type() const override
44 {
45 return keyType;
46 }
47 KeyAlgorithm algorithm() const override
48 {
49 return keyAlgorithm;
50 }
51 bool isPkcs8 () const override
52 {
53 return false;
54 }
55
56 QByteArray pemFromDer(const QByteArray &der, const QMap<QByteArray, QByteArray> &headers) const override;
57
58protected:
59 static QByteArray pkcs8Header(bool encrypted);
60 static QByteArray pkcs8Footer(bool encrypted);
61 static bool isEncryptedPkcs8(const QByteArray &der);
62
63 bool keyIsNull = true;
66};
67
68} // namespace QTlsPrivate
69
71
72#endif // QTLSKEY_BASE_P_H
\inmodule QtCore
Definition qbytearray.h:57
KeyType type() const override
bool isPkcs8() const override
QByteArray pemFromDer(const QByteArray &der, const QMap< QByteArray, QByteArray > &headers) const override
KeyAlgorithm algorithm() const override
static bool isEncryptedPkcs8(const QByteArray &der)
static QByteArray pkcs8Footer(bool encrypted)
static QByteArray pkcs8Header(bool encrypted)
bool isNull() const override
TlsKeyBase(KeyType type=QSsl::PublicKey, KeyAlgorithm algorithm=QSsl::Opaque)
TlsKey is an abstract class, that allows a TLS plugin to provide an underlying implementation for the...
KeyType
Describes the two types of keys QSslKey supports.
Definition qssl.h:22
@ PublicKey
Definition qssl.h:24
KeyAlgorithm
Describes the different key algorithms supported by QSslKey.
Definition qssl.h:34
@ Opaque
Definition qssl.h:35
Combined button and popup list for selecting options.
Namespace containing onternal types that TLS backends implement.
GLenum type