![]() |
Qt 6.x
The Qt SDK
|
#include <qx509_openssl_p.h>
Additional Inherited Members | |
![]() | |
bool | validIndex (qsizetype index) const |
![]() | |
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 36 of file qx509_openssl_p.h.
|
default |
QTlsPrivate::X509CertificateOpenSSL::~X509CertificateOpenSSL | ( | ) |
Definition at line 399 of file qx509_openssl.cpp.
References q_X509_free().
|
static |
Definition at line 539 of file qx509_openssl.cpp.
References QByteArray::chop(), QByteArray::data(), QByteArray::length(), QByteArray::number(), q_X509_dup(), q_X509_get_issuer_name(), q_X509_get_serialNumber(), q_X509_get_subject_name(), q_X509_get_version(), q_X509_getm_notAfter(), q_X509_getm_notBefore(), QByteArray::reserve(), QByteArray::rightJustified(), and QTlsPrivate::X509CertificateBase::serialNumber().
Referenced by certificatesFromDer(), certificatesFromPem(), QTlsPrivate::TlsCryptographOpenSSL::emitErrorFromCallback(), importPkcs12(), stackOfX509ToQSslCertificates(), QTlsPrivate::TlsCryptographOpenSSL::storePeerCertificates(), and QTlsPrivate::TlsCryptographOpenSSL::transmit().
|
static |
Definition at line 754 of file qx509_openssl.cpp.
References certificateFromX509(), QByteArray::data(), q_d2i_X509(), q_X509_free(), QByteArray::size(), and QList< T >::size().
Referenced by QTlsBackendOpenSSL::X509DerReader().
|
static |
Definition at line 720 of file qx509_openssl.cpp.
References BEGINCERTSTRING, certificateFromX509(), QByteArray::data(), ENDCERTSTRING, QByteArray::fromBase64(), QByteArray::fromRawData(), QByteArray::indexOf(), QTlsPrivate::X509CertificateBase::matchLineFeed(), q_d2i_X509(), q_X509_free(), QByteArray::size(), and QList< T >::size().
Referenced by QTlsBackendOpenSSL::X509PemReader().
|
static |
Definition at line 592 of file qx509_openssl.cpp.
References Q_ASSERT, q_X509_STORE_CTX_get_error(), and q_X509_STORE_CTX_get_error_depth().
Referenced by QTlsPrivate::TlsCryptographOpenSSL::emitErrorFromCallback(), QTlsPrivate::q_X509Callback(), dtlscallbacks::q_X509DtlsCallback(), and QTlsPrivate::qt_X509Callback().
|
overridevirtual |
This function is expected to return a pointer to the native certificate handle, if there is one, else nullptr.
Implements QTlsPrivate::X509Certificate.
Definition at line 521 of file qx509_openssl.cpp.
Referenced by verify().
|
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 526 of file qx509_openssl.cpp.
References q_EVP_sha1(), q_X509_digest(), qHashBits(), and seed.
|
static |
Definition at line 774 of file qx509_openssl.cpp.
References cert, certificateFromX509(), QByteArray::constData(), device, Q_ASSERT, q_BIO_free(), q_BIO_new_mem_buf(), q_d2i_PKCS12_bio(), q_ERR_error_string(), q_ERR_get_error(), q_EVP_PKEY_free(), q_OPENSSL_sk_pop_free(), q_PKCS12_free(), q_PKCS12_parse(), q_X509_free(), qCWarning, qScopeGuard(), QByteArray::size(), STACK_OF(), and stackOfX509ToQSslCertificates().
Referenced by QTlsBackendOpenSSL::X509Pkcs12Reader().
|
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 405 of file qx509_openssl.cpp.
References QTlsBackendOpenSSL::logAndClearErrorQueue(), other(), q_X509_cmp(), and ret.
|
overridevirtual |
This function is needed to implement QSslCertificate::isSelfSigned()
Implements QTlsPrivate::X509Certificate.
Definition at line 419 of file qx509_openssl.cpp.
References q_X509_check_issued().
|
static |
Definition at line 837 of file qx509_openssl.cpp.
References cert, QSslError::CertificateExpired, QSslError::CertificateNotYetValid, QSslError::CertificateRejected, QSslError::CertificateRevoked, QSslError::CertificateSignatureFailed, QSslError::CertificateUntrusted, error, QSslError::InvalidCaCertificate, QSslError::InvalidNotAfterField, QSslError::InvalidNotBeforeField, QSslError::InvalidPurpose, QSslError::PathLengthExceeded, QSslError::SelfSignedCertificate, QSslError::SelfSignedCertificateInChain, QSslError::UnableToDecodeIssuerPublicKey, QSslError::UnableToDecryptCertificateSignature, QSslError::UnableToGetIssuerCertificate, QSslError::UnableToGetLocalIssuerCertificate, QSslError::UnableToVerifyFirstCertificate, and QSslError::UnspecifiedError.
Referenced by QTlsPrivate::TlsCryptographOpenSSL::emitErrorFromCallback(), QTlsPrivate::TlsCryptographOpenSSL::startHandshake(), and verify().
|
overridevirtual |
Returns the certificate subject's public key.
Reimplemented from QTlsPrivate::X509Certificate.
Definition at line 489 of file qx509_openssl.cpp.
References QTlsPrivate::TlsKeyOpenSSL::publicKeyFromX509().
|
static |
Definition at line 578 of file qx509_openssl.cpp.
References certificateFromX509(), i, q_sk_X509_num, and q_sk_X509_value.
Referenced by importPkcs12(), and QTlsPrivate::TlsCryptographOpenSSL::storePeerCertificates().
|
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 428 of file qx509_openssl.cpp.
References QSsl::DnsEntry, QSsl::EmailEntry, QString::fromLatin1(), i, QSsl::IpAddressEntry, QHostAddress::isNull(), q_ASN1_STRING_get0_data(), q_ASN1_STRING_length(), q_GENERAL_NAME_free(), q_OPENSSL_sk_pop_free(), q_sk_GENERAL_NAME_num, q_sk_GENERAL_NAME_value, q_X509_get_ext_d2i(), qFromBigEndian(), STACK_OF(), and QHostAddress::toString().
|
overridevirtual |
This function is expected to return this certificate converted to a DER (binary) encoded representation.
Implements QTlsPrivate::X509Certificate.
Definition at line 505 of file qx509_openssl.cpp.
References QSsl::Der.
|
overridevirtual |
This function is expected to return this certificate converted to a PEM (Base64) encoded representation.
Implements QTlsPrivate::X509Certificate.
Definition at line 497 of file qx509_openssl.cpp.
References QSsl::Pem.
|
overridevirtual |
This function is expected to return this certificate converted to a human-readable text representation.
Implements QTlsPrivate::X509Certificate.
Definition at line 513 of file qx509_openssl.cpp.
|
static |
Definition at line 615 of file qx509_openssl.cpp.
References cert, QSslError::CertificateBlacklisted, QDateTime::currentDateTimeUtc(), error, handle(), QSslError::HostNameMismatch, QString::isEmpty(), now, openSSLErrorToQSslError(), q_OPENSSL_sk_free(), q_OPENSSL_sk_new_null(), q_OPENSSL_sk_push(), q_X509_STORE_add_cert(), q_X509_STORE_CTX_free(), q_X509_STORE_CTX_init(), q_X509_STORE_CTX_new(), q_X509_STORE_free(), q_X509_STORE_new(), q_X509_STORE_set_ex_data(), q_X509_STORE_set_verify_cb(), q_X509_verify_cert(), qCWarning, QTlsPrivate::qt_X509Callback(), QList< T >::reserve(), QList< T >::size(), STACK_OF(), QSslError::UnspecifiedError, QList< T >::value(), and void.
|
static |
Definition at line 599 of file qx509_openssl.cpp.
References QList< T >::append(), QSslConfiguration::caCertificates(), QSslConfiguration::defaultConfiguration(), QSslSocketPrivate::rootCertOnDemandLoadingSupported(), QSslSocketPrivate::systemCaCertificates(), and verify().
Referenced by verify(), and QTlsBackendOpenSSL::X509Verifier().