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 | #include "qtlsbackend_cert_p.h" |
5 | |
6 | #include "../shared/qx509_generic_p.h" |
7 | |
8 | #include <qssl.h> |
9 | |
10 | #include <qlist.h> |
11 | |
12 | QT_BEGIN_NAMESPACE |
13 | |
14 | QString QTlsBackendCertOnly::backendName() const |
15 | { |
16 | return builtinBackendNames[nameIndexCertOnly]; |
17 | } |
18 | |
19 | |
20 | QList<QSsl::SslProtocol> QTlsBackendCertOnly::supportedProtocols() const |
21 | { |
22 | return {}; |
23 | } |
24 | |
25 | QList<QSsl::SupportedFeature> QTlsBackendCertOnly::supportedFeatures() const |
26 | { |
27 | return {}; |
28 | } |
29 | |
30 | QList<QSsl::ImplementedClass> QTlsBackendCertOnly::implementedClasses() const |
31 | { |
32 | QList<QSsl::ImplementedClass> classes; |
33 | classes << QSsl::ImplementedClass::Certificate; |
34 | |
35 | return classes; |
36 | } |
37 | |
38 | QTlsPrivate::X509Certificate *QTlsBackendCertOnly::createCertificate() const |
39 | { |
40 | return new QTlsPrivate::X509CertificateGeneric; |
41 | } |
42 | |
43 | QTlsPrivate::X509PemReaderPtr QTlsBackendCertOnly::X509PemReader() const |
44 | { |
45 | return QTlsPrivate::X509CertificateGeneric::certificatesFromPem; |
46 | } |
47 | |
48 | QTlsPrivate::X509DerReaderPtr QTlsBackendCertOnly::X509DerReader() const |
49 | { |
50 | return QTlsPrivate::X509CertificateGeneric::certificatesFromDer; |
51 | } |
52 | |
53 | QT_END_NAMESPACE |
54 | |
55 | #include "moc_qtlsbackend_cert_p.cpp" |
56 | |
57 |