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::X509CertificateBase Class Reference

#include <qx509_base_p.h>

Inheritance diagram for QTlsPrivate::X509CertificateBase:
Collaboration diagram for QTlsPrivate::X509CertificateBase:

Classes

struct  X509CertificateExtension

Public Member Functions

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 bool isEqual (const X509Certificate &other) const =0
virtual bool isSelfSigned () const =0
virtual QMultiMap< QSsl::AlternativeNameEntryType, QStringsubjectAlternativeNames () const =0
virtual TlsKeypublicKey () const
virtual QByteArray toPem () const =0
virtual QByteArray toDer () const =0
virtual QString toText () const =0
virtual Qt::HANDLE handle () const =0
virtual size_t hash (size_t seed) const noexcept=0

Static Public Member Functions

static QByteArray subjectInfoToString (QSslCertificate::SubjectInfo info)
static bool matchLineFeed (const QByteArray &pem, int *offset)

Protected Member Functions

bool validIndex (qsizetype index) const

Protected Attributes

bool null = true
QByteArray versionString
QByteArray serialNumberString
QMultiMap< QByteArray, QStringissuerInfoEntries
QMultiMap< QByteArray, QStringsubjectInfoEntries
QDateTime notValidAfter
QDateTime notValidBefore
QList< X509CertificateExtensionextensions

Detailed Description

Definition at line 34 of file qx509_base_p.h.

Member Function Documentation

◆ effectiveDate()

QDateTime QTlsPrivate::X509CertificateBase::effectiveDate ( ) const
overridevirtual

This function is expected to return the date-time that the certificate becomes valid, or an empty QDateTime if this is a null certificate.

See also
expiryDate()

Implements QTlsPrivate::X509Certificate.

Definition at line 96 of file qx509_base.cpp.

◆ expiryDate()

QDateTime QTlsPrivate::X509CertificateBase::expiryDate ( ) const
overridevirtual

This function is expected to return the date-time that the certificate expires, or an empty QDateTime if this is a null certificate.

See also
effectiveDate()

Implements QTlsPrivate::X509Certificate.

Definition at line 101 of file qx509_base.cpp.

◆ isExtensionCritical()

bool QTlsPrivate::X509CertificateBase::isExtensionCritical ( qsizetype i) const
overridevirtual

This function is expected to return the criticality of the extension with index i.

See also
numberOfExtensions()

Implements QTlsPrivate::X509Certificate.

Definition at line 129 of file qx509_base.cpp.

◆ isExtensionSupported()

bool QTlsPrivate::X509CertificateBase::isExtensionSupported ( qsizetype i) const
overridevirtual

This function is expected to return true if this extension is supported. In this case, supported simply means that the structure of the QVariant returned by the valueForExtension() accessor will remain unchanged between versions.

See also
numberOfExtensions()

Implements QTlsPrivate::X509Certificate.

Definition at line 135 of file qx509_base.cpp.

◆ isNull()

bool QTlsPrivate::X509CertificateBase::isNull ( ) const
overridevirtual

Returns true if this certificate was default-constructed and not initialized yet. This function is called by QSslCertificate::isNull().

See also
QSslCertificate::isNull()

Implements QTlsPrivate::X509Certificate.

Definition at line 51 of file qx509_base.cpp.

References null.

◆ issuerInfo() [1/2]

QStringList QTlsPrivate::X509CertificateBase::issuerInfo ( const QByteArray & attribute) const
overridevirtual

This function is expected to return the issuer information for attribute from the certificate, or an empty list if there is no information for attribute in the certificate. There can be more than one entry for an attribute.

See also
QSslCertificate::issuerInfo().

Implements QTlsPrivate::X509Certificate.

Definition at line 71 of file qx509_base.cpp.

◆ issuerInfo() [2/2]

QStringList QTlsPrivate::X509CertificateBase::issuerInfo ( QSslCertificate::SubjectInfo subject) const
overridevirtual

This function is expected to return the issuer information for the subject from the certificate, or an empty list if there is no information for subject in the certificate. There can be more than one entry of each type.

See also
QSslCertificate::issuerInfo().

Implements QTlsPrivate::X509Certificate.

Definition at line 66 of file qx509_base.cpp.

◆ issuerInfoAttributes()

QList< QByteArray > QTlsPrivate::X509CertificateBase::issuerInfoAttributes ( ) const
overridevirtual

This function is expected to return a list of the attributes that have values in the issuer information of this certificate. The information associated with a given attribute can be accessed using the issuerInfo() method. Note that this list may include the OIDs for any elements that are not known by the TLS backend.

Note
This function implements QSslCertificate::issuerInfoAttributes().
See also
issuerInfo()

Implements QTlsPrivate::X509Certificate.

Definition at line 91 of file qx509_base.cpp.

◆ matchLineFeed()

bool QTlsPrivate::X509CertificateBase::matchLineFeed ( const QByteArray & pem,
int * offset )
static

Definition at line 29 of file qx509_base.cpp.

◆ nameForExtension()

QString QTlsPrivate::X509CertificateBase::nameForExtension ( qsizetype i) const
overridevirtual

This function is expected to return the name for the extension with index i. If no name is known for the extension then the OID will be returned.

See also
numberOfExtensions(), oidForExtension()

Implements QTlsPrivate::X509Certificate.

Definition at line 117 of file qx509_base.cpp.

◆ numberOfExtensions()

qsizetype QTlsPrivate::X509CertificateBase::numberOfExtensions ( ) const
overridevirtual

This function is expected to return the number of X509 extensions of this certificate.

Implements QTlsPrivate::X509Certificate.

Definition at line 106 of file qx509_base.cpp.

◆ oidForExtension()

QString QTlsPrivate::X509CertificateBase::oidForExtension ( qsizetype i) const
overridevirtual

This function is expected to return the ASN.1 OID for the extension with index i.

See also
numberOfExtensions()

Implements QTlsPrivate::X509Certificate.

Definition at line 111 of file qx509_base.cpp.

◆ serialNumber()

QByteArray QTlsPrivate::X509CertificateBase::serialNumber ( ) const
overridevirtual

This function is expected to return the certificate's serial number string in hexadecimal format.

See also
QSslCertificate::serialNumber()

Implements QTlsPrivate::X509Certificate.

Definition at line 61 of file qx509_base.cpp.

◆ subjectInfo() [1/2]

QStringList QTlsPrivate::X509CertificateBase::subjectInfo ( const QByteArray & attribute) const
overridevirtual

This function is expected to return the subject information for attribute, or an empty list if there is no information for attribute in the certificate. There can be more than one entry for an attribute.

See also
QSslCertificate::subjectInfo().

Implements QTlsPrivate::X509Certificate.

Definition at line 81 of file qx509_base.cpp.

◆ subjectInfo() [2/2]

QStringList QTlsPrivate::X509CertificateBase::subjectInfo ( QSslCertificate::SubjectInfo subject) const
overridevirtual

This function is expected to return the information for the subject, or an empty list if there is no information for subject in the certificate. There can be more than one entry of each type.

See also
QSslCertificate::subjectInfo().

Implements QTlsPrivate::X509Certificate.

Definition at line 76 of file qx509_base.cpp.

◆ subjectInfoAttributes()

QList< QByteArray > QTlsPrivate::X509CertificateBase::subjectInfoAttributes ( ) const
overridevirtual

This function is expected to return a list of the attributes that have values in the subject information of this certificate. The information associated with a given attribute can be accessed using the subjectInfo() method. Note that this list may include the OIDs for any elements that are not known by the TLS backend.

Note
This function is needed for QSslCertificate:subjectInfoAttributes().
See also
subjectInfo()

Implements QTlsPrivate::X509Certificate.

Definition at line 86 of file qx509_base.cpp.

◆ subjectInfoToString()

QByteArray QTlsPrivate::X509CertificateBase::subjectInfoToString ( QSslCertificate::SubjectInfo info)
static

Definition at line 11 of file qx509_base.cpp.

◆ validIndex()

bool QTlsPrivate::X509CertificateBase::validIndex ( qsizetype index) const
inlineprotected

Definition at line 60 of file qx509_base_p.h.

◆ valueForExtension()

QVariant QTlsPrivate::X509CertificateBase::valueForExtension ( qsizetype i) const
overridevirtual

This function is expected to return the value of the extension with index i. The structure of the value returned depends on the extension type

See also
numberOfExtensions()

Implements QTlsPrivate::X509Certificate.

Definition at line 123 of file qx509_base.cpp.

◆ version()

QByteArray QTlsPrivate::X509CertificateBase::version ( ) const
overridevirtual

Implements QSslCertificate::version().

See also
QSslCertificate::version()

Implements QTlsPrivate::X509Certificate.

Definition at line 56 of file qx509_base.cpp.

Member Data Documentation

◆ extensions

QList<X509CertificateExtension> QTlsPrivate::X509CertificateBase::extensions
protected

Definition at line 83 of file qx509_base_p.h.

◆ issuerInfoEntries

QMultiMap<QByteArray, QString> QTlsPrivate::X509CertificateBase::issuerInfoEntries
protected

Definition at line 69 of file qx509_base_p.h.

◆ notValidAfter

QDateTime QTlsPrivate::X509CertificateBase::notValidAfter
protected

Definition at line 71 of file qx509_base_p.h.

◆ notValidBefore

QDateTime QTlsPrivate::X509CertificateBase::notValidBefore
protected

Definition at line 72 of file qx509_base_p.h.

◆ null

bool QTlsPrivate::X509CertificateBase::null = true
protected

◆ serialNumberString

QByteArray QTlsPrivate::X509CertificateBase::serialNumberString
protected

Definition at line 67 of file qx509_base_p.h.

◆ subjectInfoEntries

QMultiMap<QByteArray, QString> QTlsPrivate::X509CertificateBase::subjectInfoEntries
protected

Definition at line 70 of file qx509_base_p.h.

◆ versionString

QByteArray QTlsPrivate::X509CertificateBase::versionString
protected

Definition at line 66 of file qx509_base_p.h.


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