![]() |
Qt 6.x
The Qt SDK
|
#include <qx509_base_p.h>
Classes | |
struct | X509CertificateExtension |
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, QString > | issuerInfoEntries |
QMultiMap< QByteArray, QString > | subjectInfoEntries |
QDateTime | notValidAfter |
QDateTime | notValidBefore |
QList< X509CertificateExtension > | extensions |
Definition at line 33 of file qx509_base_p.h.
|
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.
Implements QTlsPrivate::X509Certificate.
Definition at line 95 of file qx509_base.cpp.
References notValidBefore.
|
overridevirtual |
This function is expected to return the date-time that the certificate expires, or an empty QDateTime if this is a null certificate.
Implements QTlsPrivate::X509Certificate.
Definition at line 100 of file qx509_base.cpp.
References notValidAfter.
|
overridevirtual |
This function is expected to return the criticality of the extension with index i.
Implements QTlsPrivate::X509Certificate.
Definition at line 128 of file qx509_base.cpp.
References extensions, Q_ASSERT, and validIndex().
|
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.
Implements QTlsPrivate::X509Certificate.
Definition at line 134 of file qx509_base.cpp.
References extensions, Q_ASSERT, and validIndex().
|
overridevirtual |
Returns true if this certificate was default-constructed and not initialized yet. This function is called by QSslCertificate::isNull().
Implements QTlsPrivate::X509Certificate.
Definition at line 50 of file qx509_base.cpp.
References null.
|
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.
Implements QTlsPrivate::X509Certificate.
Definition at line 70 of file qx509_base.cpp.
References issuerInfoEntries, and QMultiMap< Key, T >::values().
|
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.
Implements QTlsPrivate::X509Certificate.
Definition at line 65 of file qx509_base.cpp.
References info, issuerInfo(), and subjectInfoToString().
Referenced by issuerInfo().
|
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.
Implements QTlsPrivate::X509Certificate.
Definition at line 90 of file qx509_base.cpp.
References issuerInfoEntries, and QMultiMap< Key, T >::uniqueKeys().
|
static |
Definition at line 28 of file qx509_base.cpp.
References QByteArray::at(), ch, Q_ASSERT, and QByteArray::size().
Referenced by QTlsPrivate::X509CertificateOpenSSL::certificatesFromPem(), and QTlsPrivate::X509CertificateGeneric::certificatesFromPem().
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.
Implements QTlsPrivate::X509Certificate.
Definition at line 116 of file qx509_base.cpp.
References extensions, Q_ASSERT, and validIndex().
|
overridevirtual |
This function is expected to return the number of X509 extensions of this certificate.
Implements QTlsPrivate::X509Certificate.
Definition at line 105 of file qx509_base.cpp.
References extensions.
This function is expected to return the ASN.1 OID for the extension with index i.
Implements QTlsPrivate::X509Certificate.
Definition at line 110 of file qx509_base.cpp.
References extensions, Q_ASSERT, and validIndex().
|
overridevirtual |
This function is expected to return the certificate's serial number string in hexadecimal format.
Implements QTlsPrivate::X509Certificate.
Definition at line 60 of file qx509_base.cpp.
References serialNumberString.
Referenced by QTlsPrivate::X509CertificateOpenSSL::certificateFromX509().
|
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.
Implements QTlsPrivate::X509Certificate.
Definition at line 80 of file qx509_base.cpp.
References subjectInfoEntries, and QMultiMap< Key, T >::values().
|
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.
Implements QTlsPrivate::X509Certificate.
Definition at line 75 of file qx509_base.cpp.
References info, subjectInfo(), and subjectInfoToString().
Referenced by subjectInfo().
|
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.
Implements QTlsPrivate::X509Certificate.
Definition at line 85 of file qx509_base.cpp.
References subjectInfoEntries, and QMultiMap< Key, T >::uniqueKeys().
|
static |
Definition at line 10 of file qx509_base.cpp.
References QSslCertificate::CommonName, QSslCertificate::CountryName, QSslCertificate::DistinguishedNameQualifier, QSslCertificate::EmailAddress, info, QSslCertificate::LocalityName, QSslCertificate::Organization, QSslCertificate::OrganizationalUnitName, QSslCertificate::SerialNumber, QSslCertificate::StateOrProvinceName, and str.
Referenced by issuerInfo(), and subjectInfo().
|
inlineprotected |
Definition at line 59 of file qx509_base_p.h.
References extensions.
Referenced by isExtensionCritical(), isExtensionSupported(), nameForExtension(), oidForExtension(), and valueForExtension().
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
Implements QTlsPrivate::X509Certificate.
Definition at line 122 of file qx509_base.cpp.
References extensions, Q_ASSERT, and validIndex().
|
overridevirtual |
Implements QSslCertificate::version().
Implements QTlsPrivate::X509Certificate.
Definition at line 55 of file qx509_base.cpp.
References versionString.
|
protected |
Definition at line 82 of file qx509_base_p.h.
Referenced by isExtensionCritical(), isExtensionSupported(), nameForExtension(), numberOfExtensions(), oidForExtension(), QTlsPrivate::X509CertificateGeneric::parse(), validIndex(), and valueForExtension().
|
protected |
Definition at line 68 of file qx509_base_p.h.
Referenced by issuerInfo(), issuerInfoAttributes(), and QTlsPrivate::X509CertificateGeneric::parse().
|
protected |
Definition at line 70 of file qx509_base_p.h.
Referenced by expiryDate(), and QTlsPrivate::X509CertificateGeneric::parse().
|
protected |
Definition at line 71 of file qx509_base_p.h.
Referenced by effectiveDate(), and QTlsPrivate::X509CertificateGeneric::parse().
|
protected |
Definition at line 64 of file qx509_base_p.h.
Referenced by isNull(), QTlsPrivate::X509CertificateGeneric::isSelfSigned(), and QTlsPrivate::X509CertificateGeneric::parse().
|
protected |
Definition at line 66 of file qx509_base_p.h.
Referenced by QTlsPrivate::X509CertificateGeneric::parse(), and serialNumber().
|
protected |
Definition at line 69 of file qx509_base_p.h.
Referenced by QTlsPrivate::X509CertificateGeneric::parse(), subjectInfo(), and subjectInfoAttributes().
|
protected |
Definition at line 65 of file qx509_base_p.h.
Referenced by QTlsPrivate::X509CertificateGeneric::parse(), and version().