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