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
QTlsPrivate::X509CertificateGeneric Class Reference

#include <qx509_generic_p.h>

Inheritance diagram for QTlsPrivate::X509CertificateGeneric:
Collaboration diagram for QTlsPrivate::X509CertificateGeneric:

Public Member Functions

bool isEqual (const X509Certificate &rhs) const override
bool isSelfSigned () const override
QMultiMap< QSsl::AlternativeNameEntryType, QStringsubjectAlternativeNames () const override
QByteArray toPem () const override
QByteArray toDer () const override
QString toText () const override
Qt::HANDLE handle () const override
size_t hash (size_t seed) const noexcept override
Public Member Functions inherited from QTlsPrivate::X509CertificateBase
bool isNull () const override
QByteArray version () const override
QByteArray serialNumber () const override
QStringList issuerInfo (QSslCertificate::SubjectInfo info) const override
QStringList issuerInfo (const QByteArray &attribute) const override
QStringList subjectInfo (QSslCertificate::SubjectInfo info) const override
QStringList subjectInfo (const QByteArray &attribute) const override
QList< QByteArraysubjectInfoAttributes () const override
QList< QByteArrayissuerInfoAttributes () const override
QDateTime effectiveDate () const override
QDateTime expiryDate () const override
qsizetype numberOfExtensions () const override
QString oidForExtension (qsizetype index) const override
QString nameForExtension (qsizetype index) const override
QVariant valueForExtension (qsizetype index) const override
bool isExtensionCritical (qsizetype index) const override
bool isExtensionSupported (qsizetype index) const override
Public Member Functions inherited from QTlsPrivate::X509Certificate
virtual ~X509Certificate ()
virtual TlsKeypublicKey () const

Static Public Member Functions

static QList< QSslCertificatecertificatesFromPem (const QByteArray &pem, int count)
static QList< QSslCertificatecertificatesFromDer (const QByteArray &der, int count)
Static Public Member Functions inherited from QTlsPrivate::X509CertificateBase
static QByteArray subjectInfoToString (QSslCertificate::SubjectInfo info)
static bool matchLineFeed (const QByteArray &pem, int *offset)

Protected Member Functions

bool parse (const QByteArray &data)
bool parseExtension (const QByteArray &data, X509CertificateExtension &extension)
Protected Member Functions inherited from QTlsPrivate::X509CertificateBase
bool validIndex (qsizetype index) const

Protected Attributes

bool subjectMatchesIssuer = false
QSsl::KeyAlgorithm publicKeyAlgorithm = QSsl::Rsa
QByteArray publicKeyDerData
QMultiMap< QSsl::AlternativeNameEntryType, QStringsaNames
QByteArray derData
Protected Attributes inherited from QTlsPrivate::X509CertificateBase
bool null = true
QByteArray versionString
QByteArray serialNumberString
QMultiMap< QByteArray, QStringissuerInfoEntries
QMultiMap< QByteArray, QStringsubjectInfoEntries
QDateTime notValidAfter
QDateTime notValidBefore
QList< X509CertificateExtensionextensions

Detailed Description

Definition at line 32 of file qx509_generic_p.h.

Member Function Documentation

◆ certificatesFromDer()

QList< QSslCertificate > QTlsPrivate::X509CertificateGeneric::certificatesFromDer ( const QByteArray & der,
int count )
static

Definition at line 128 of file qx509_generic.cpp.

◆ certificatesFromPem()

QList< QSslCertificate > QTlsPrivate::X509CertificateGeneric::certificatesFromPem ( const QByteArray & pem,
int count )
static

Definition at line 100 of file qx509_generic.cpp.

◆ handle()

Qt::HANDLE QTlsPrivate::X509CertificateGeneric::handle ( ) const
overridevirtual

This function is expected to return a pointer to the native certificate handle, if there is one, else nullptr.

Implements QTlsPrivate::X509Certificate.

Reimplemented in QTlsPrivate::X509CertificateSchannel.

Definition at line 89 of file qx509_generic.cpp.

◆ hash()

size_t QTlsPrivate::X509CertificateGeneric::hash ( size_t seed) const
overridevirtualnoexcept

This function is expected to return the hash value for this certificate, using seed to seed the calculation.

Implements QTlsPrivate::X509Certificate.

Definition at line 95 of file qx509_generic.cpp.

◆ isEqual()

bool QTlsPrivate::X509CertificateGeneric::isEqual ( const X509Certificate & other) const
overridevirtual

This function is expected to return true if this certificate is the same as the other, false otherwise. Used by QSslCertificate's comparison operators.

Implements QTlsPrivate::X509Certificate.

Definition at line 38 of file qx509_generic.cpp.

◆ isSelfSigned()

bool QTlsPrivate::X509CertificateGeneric::isSelfSigned ( ) const
overridevirtual

◆ parse()

◆ parseExtension()

bool QTlsPrivate::X509CertificateGeneric::parseExtension ( const QByteArray & data,
X509CertificateExtension & extension )
protected

Definition at line 325 of file qx509_generic.cpp.

References QAsn1Element::BooleanType, QTlsPrivate::X509CertificateBase::X509CertificateExtension::critical, QAsn1Element::ObjectIdentifierType, QAsn1Element::OctetStringType, QAsn1Element::SequenceType, QTlsPrivate::X509CertificateBase::X509CertificateExtension::supported, and QAsn1Element::toBool().

Here is the call graph for this function:

◆ subjectAlternativeNames()

QMultiMap< QSsl::AlternativeNameEntryType, QString > QTlsPrivate::X509CertificateGeneric::subjectAlternativeNames ( ) const
overridevirtual

This function is expected to return the list of alternative subject names for this certificate. The alternative names typically contain host names, optionally with wildcards, that are valid for this certificate.

See also
subjectInfo()

Implements QTlsPrivate::X509Certificate.

Definition at line 52 of file qx509_generic.cpp.

◆ toDer()

QByteArray QTlsPrivate::X509CertificateGeneric::toDer ( ) const
overridevirtual

This function is expected to return this certificate converted to a DER (binary) encoded representation.

Implements QTlsPrivate::X509Certificate.

Definition at line 78 of file qx509_generic.cpp.

◆ toPem()

QByteArray QTlsPrivate::X509CertificateGeneric::toPem ( ) const
overridevirtual

This function is expected to return this certificate converted to a PEM (Base64) encoded representation.

Implements QTlsPrivate::X509Certificate.

Definition at line 60 of file qx509_generic.cpp.

◆ toText()

QString QTlsPrivate::X509CertificateGeneric::toText ( ) const
overridevirtual

This function is expected to return this certificate converted to a human-readable text representation.

Implements QTlsPrivate::X509Certificate.

Definition at line 83 of file qx509_generic.cpp.

Member Data Documentation

◆ derData

QByteArray QTlsPrivate::X509CertificateGeneric::derData
protected

Definition at line 56 of file qx509_generic_p.h.

◆ publicKeyAlgorithm

QSsl::KeyAlgorithm QTlsPrivate::X509CertificateGeneric::publicKeyAlgorithm = QSsl::Rsa
protected

Definition at line 52 of file qx509_generic_p.h.

◆ publicKeyDerData

QByteArray QTlsPrivate::X509CertificateGeneric::publicKeyDerData
protected

Definition at line 53 of file qx509_generic_p.h.

◆ saNames

QMultiMap<QSsl::AlternativeNameEntryType, QString> QTlsPrivate::X509CertificateGeneric::saNames
protected

Definition at line 55 of file qx509_generic_p.h.

◆ subjectMatchesIssuer

bool QTlsPrivate::X509CertificateGeneric::subjectMatchesIssuer = false
protected

Definition at line 51 of file qx509_generic_p.h.

Referenced by isSelfSigned(), and parse().


The documentation for this class was generated from the following files: