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
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 31 of file qx509_generic_p.h.

Member Function Documentation

◆ certificatesFromDer()

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

Definition at line 127 of file qx509_generic.cpp.

References cert, and QList< T >::remove().

Referenced by certificatesFromPem(), QTlsBackendCertOnly::X509DerReader(), QSchannelBackend::X509DerReader(), and QSecureTransportBackend::X509DerReader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ certificatesFromPem()

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

Definition at line 99 of file qx509_generic.cpp.

References BEGINCERTSTRING, certificatesFromDer(), ENDCERTSTRING, QByteArray::fromBase64(), QByteArray::fromRawData(), and QTlsPrivate::X509CertificateBase::matchLineFeed().

Referenced by QTlsBackendCertOnly::X509PemReader(), QSchannelBackend::X509PemReader(), and QSecureTransportBackend::X509PemReader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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 88 of file qx509_generic.cpp.

References Q_UNIMPLEMENTED.

◆ 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 94 of file qx509_generic.cpp.

References qHash(), and seed.

+ Here is the call graph for this function:

◆ 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 37 of file qx509_generic.cpp.

References derData, and other().

+ Here is the call graph for this function:

◆ isSelfSigned()

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

◆ parse()

bool QTlsPrivate::X509CertificateGeneric::parse ( const QByteArray & data)
protected

◆ parseExtension()

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

Definition at line 324 of file qx509_generic.cpp.

References QList< T >::at(), QAsn1Element::BooleanType, QAsn1Element::DnsNameType, el, extension(), QString::fromLatin1(), items, QAsn1Element::ObjectIdentifierType, QAsn1Element::OctetStringType, ok, QStringLiteral, QAsn1Element::Rfc822NameType, QAsn1Element::SequenceType, QList< T >::size(), QList< T >::toList(), QTreeWidgetItem::type(), and QAsn1Element::UniformResourceIdentifierType.

Referenced by parse().

+ Here is the call graph for this function:
+ Here is the caller 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 51 of file qx509_generic.cpp.

References saNames.

◆ 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 77 of file qx509_generic.cpp.

References derData.

Referenced by toPem().

+ Here is the caller graph for this function:

◆ 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 59 of file qx509_generic.cpp.

References BEGINCERTSTRING, ENDCERTSTRING, QByteArray::fromRawData(), i, and toDer().

+ Here is the call graph for this function:

◆ 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 82 of file qx509_generic.cpp.

References Q_UNIMPLEMENTED.

Member Data Documentation

◆ derData

◆ publicKeyAlgorithm

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

◆ publicKeyDerData

QByteArray QTlsPrivate::X509CertificateGeneric::publicKeyDerData
protected

◆ saNames

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

Definition at line 54 of file qx509_generic_p.h.

Referenced by parse(), and subjectAlternativeNames().

◆ subjectMatchesIssuer

bool QTlsPrivate::X509CertificateGeneric::subjectMatchesIssuer = false
protected

Definition at line 50 of file qx509_generic_p.h.

Referenced by isSelfSigned(), and parse().


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