![]() |
Qt 6.x
The Qt SDK
|
#include <qx509_generic_p.h>
Static Public Member Functions | |
static QList< QSslCertificate > | certificatesFromPem (const QByteArray &pem, int count) |
static QList< QSslCertificate > | certificatesFromDer (const QByteArray &der, int count) |
![]() | |
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) |
![]() | |
bool | validIndex (qsizetype index) const |
Protected Attributes | |
bool | subjectMatchesIssuer = false |
QSsl::KeyAlgorithm | publicKeyAlgorithm = QSsl::Rsa |
QByteArray | publicKeyDerData |
QMultiMap< QSsl::AlternativeNameEntryType, QString > | saNames |
QByteArray | derData |
![]() | |
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 31 of file qx509_generic_p.h.
|
static |
Definition at line 127 of file qx509_generic.cpp.
References cert, QList< T >::remove(), and QList< T >::size().
Referenced by certificatesFromPem(), QTlsBackendCertOnly::X509DerReader(), QSchannelBackend::X509DerReader(), and QSecureTransportBackend::X509DerReader().
|
static |
Definition at line 99 of file qx509_generic.cpp.
References BEGINCERTSTRING, certificatesFromDer(), QByteArray::data(), ENDCERTSTRING, QByteArray::fromBase64(), QByteArray::fromRawData(), QByteArray::indexOf(), QTlsPrivate::X509CertificateBase::matchLineFeed(), QByteArray::size(), and QList< T >::size().
Referenced by QTlsBackendCertOnly::X509PemReader(), QSchannelBackend::X509PemReader(), and QSecureTransportBackend::X509PemReader().
|
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.
|
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.
|
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().
|
overridevirtual |
This function is needed to implement QSslCertificate::isSelfSigned()
Implements QTlsPrivate::X509Certificate.
Definition at line 43 of file qx509_generic.cpp.
References QTlsPrivate::X509CertificateBase::null, and subjectMatchesIssuer.
|
protected |
Definition at line 145 of file qx509_generic.cpp.
References QByteArray::at(), cert, QAsn1Element::Context0Type, QAsn1Element::Context3Type, QByteArray::data(), derData, QDataStream::device(), QSsl::DnsEntry, QAsn1Element::DnsNameType, QSsl::Dsa, DSA_ENCRYPTION_OID, QSsl::Ec, EC_ENCRYPTION_OID, QSsl::EmailEntry, extension(), QTlsPrivate::X509CertificateBase::extensions, QAsn1Element::GeneralizedTimeType, QMultiMap< Key, T >::insert(), QAsn1Element::IntegerType, QSsl::IpAddressEntry, QAsn1Element::IpAddressType, QByteArray::isEmpty(), QHostAddress::isNull(), QTlsPrivate::X509CertificateBase::issuerInfoEntries, QDateTime::isValid(), QByteArray::left(), QByteArray::mid(), QTlsPrivate::X509CertificateBase::notValidAfter, QTlsPrivate::X509CertificateBase::notValidBefore, QTlsPrivate::X509CertificateBase::null, QByteArray::number(), QAsn1Element::ObjectIdentifierType, QSsl::Opaque, parseExtension(), QIODevice::pos(), publicKeyAlgorithm, publicKeyDerData, qFromBigEndian(), QStringLiteral, QAsn1Element::read(), QDataStream::readRawData(), QByteArray::resize(), QAsn1Element::Rfc822NameType, QSsl::Rsa, RSA_ENCRYPTION_OID, saNames, QIODevice::seek(), QAsn1Element::SequenceType, QTlsPrivate::X509CertificateBase::serialNumberString, QByteArray::size(), QTlsPrivate::X509CertificateBase::subjectInfoEntries, subjectMatchesIssuer, QAsn1Element::toDateTime(), QAsn1Element::toInfo(), QAsn1Element::toObjectId(), QHostAddress::toString(), QAsn1Element::toString(), QAsn1Element::type(), QAsn1Element::UtcTimeType, QAsn1Element::value(), QList< T >::value(), and QTlsPrivate::X509CertificateBase::versionString.
|
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::read(), QAsn1Element::Rfc822NameType, QAsn1Element::SequenceType, QList< T >::size(), QAsn1Element::toBool(), QList< T >::toList(), QAsn1Element::toObjectId(), QAsn1Element::toObjectName(), QAsn1Element::type(), QTreeWidgetItem::type(), QAsn1Element::UniformResourceIdentifierType, and QAsn1Element::value().
Referenced by parse().
|
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.
Implements QTlsPrivate::X509Certificate.
Definition at line 51 of file qx509_generic.cpp.
References saNames.
|
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().
|
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().
|
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.
|
protected |
Definition at line 55 of file qx509_generic_p.h.
Referenced by QTlsPrivate::X509CertificateSchannel::importPkcs12(), isEqual(), parse(), QTlsPrivate::X509CertificateSchannel::QSslCertificate_from_CERT_CONTEXT(), and toDer().
|
protected |
Definition at line 51 of file qx509_generic_p.h.
Referenced by parse(), QTlsPrivate::X509CertificateSchannel::publicKey(), and QTlsPrivate::X509CertificateSecureTransport::publicKey().
|
protected |
Definition at line 52 of file qx509_generic_p.h.
Referenced by parse(), QTlsPrivate::X509CertificateSchannel::publicKey(), and QTlsPrivate::X509CertificateSecureTransport::publicKey().
|
protected |
Definition at line 54 of file qx509_generic_p.h.
Referenced by parse(), and subjectAlternativeNames().
|
protected |
Definition at line 50 of file qx509_generic_p.h.
Referenced by isSelfSigned(), and parse().