![]() |
Qt 6.x
The Qt SDK
|
The QSslError class provides an SSL error. More...
#include <qsslerror.h>
Public Member Functions | |
QSslError () | |
Constructs a QSslError object with no error and default certificate. | |
QSslError (SslError error) | |
Constructs a QSslError object. | |
QSslError (SslError error, const QSslCertificate &certificate) | |
Constructs a QSslError object. | |
QSslError (const QSslError &other) | |
Constructs an identical copy of other. | |
void | swap (QSslError &other) noexcept |
~QSslError () | |
Destroys the QSslError object. | |
QSslError & | operator= (QSslError &&other) noexcept |
QSslError & | operator= (const QSslError &other) |
bool | operator== (const QSslError &other) const |
bool | operator!= (const QSslError &other) const |
SslError | error () const |
Returns the type of the error. | |
QString | errorString () const |
Returns a short localized human-readable description of the error. | |
QSslCertificate | certificate () const |
Returns the certificate associated with this error, or a null certificate if the error does not relate to any certificate. | |
The QSslError class provides an SSL error.
\reentrant
\inmodule QtNetwork
QSslError provides a simple API for managing errors during QSslSocket's SSL handshake.
Definition at line 20 of file qsslerror.h.
enum QSslError::SslError |
Describes all recognized errors that can occur during an SSL handshake.
\value NoError \value UnableToGetIssuerCertificate \value UnableToDecryptCertificateSignature \value UnableToDecodeIssuerPublicKey \value CertificateSignatureFailed \value CertificateNotYetValid \value CertificateExpired \value InvalidNotBeforeField \value InvalidNotAfterField \value SelfSignedCertificate \value SelfSignedCertificateInChain \value UnableToGetLocalIssuerCertificate \value UnableToVerifyFirstCertificate \value CertificateRevoked \value InvalidCaCertificate \value PathLengthExceeded \value InvalidPurpose \value CertificateUntrusted \value CertificateRejected \value SubjectIssuerMismatch \value AuthorityIssuerSerialNumberMismatch \value NoPeerCertificate \value HostNameMismatch \value UnspecifiedError \value NoSslSupport \value CertificateBlacklisted \value CertificateStatusUnknown \value OcspNoResponseFound \value OcspMalformedRequest \value OcspMalformedResponse \value OcspInternalError \value OcspTryLater \value OcspSigRequred \value OcspUnauthorized \value OcspResponseCannotBeTrusted \value OcspResponseCertIdUnknown \value OcspResponseExpired \value OcspStatusUnknown
Definition at line 24 of file qsslerror.h.
QSslError::QSslError | ( | ) |
Constructs a QSslError object with no error and default certificate.
Definition at line 102 of file qsslerror.cpp.
References NoError.
|
explicit |
Constructs a QSslError object.
The argument specifies the error that occurred.
Definition at line 114 of file qsslerror.cpp.
References error().
QSslError::QSslError | ( | SslError | error, |
const QSslCertificate & | certificate | ||
) |
Constructs a QSslError object.
The two arguments specify the error that occurred, and which certificate the error relates to.
Definition at line 127 of file qsslerror.cpp.
References certificate(), and error().
QSslError::QSslError | ( | const QSslError & | other | ) |
Constructs an identical copy of other.
Definition at line 137 of file qsslerror.cpp.
References other().
QSslError::~QSslError | ( | ) |
Destroys the QSslError object.
Definition at line 146 of file qsslerror.cpp.
QSslCertificate QSslError::certificate | ( | ) | const |
Returns the certificate associated with this error, or a null certificate if the error does not relate to any certificate.
Definition at line 329 of file qsslerror.cpp.
Referenced by QSslError().
QSslError::SslError QSslError::error | ( | ) | const |
Returns the type of the error.
Definition at line 193 of file qsslerror.cpp.
Referenced by QSslError(), and QSslError().
QString QSslError::errorString | ( | ) | const |
Returns a short localized human-readable description of the error.
Definition at line 203 of file qsslerror.cpp.
References AuthorityIssuerSerialNumberMismatch, CertificateBlacklisted, CertificateExpired, CertificateNotYetValid, CertificateRejected, CertificateSignatureFailed, CertificateUntrusted, HostNameMismatch, InvalidCaCertificate, InvalidNotAfterField, InvalidNotBeforeField, InvalidPurpose, NoError, NoPeerCertificate, NoSslSupport, OcspInternalError, OcspMalformedRequest, OcspMalformedResponse, OcspNoResponseFound, OcspResponseCannotBeTrusted, OcspResponseCertIdUnknown, OcspResponseExpired, OcspSigRequred, OcspStatusUnknown, OcspTryLater, OcspUnauthorized, PathLengthExceeded, SelfSignedCertificate, SelfSignedCertificateInChain, SubjectIssuerMismatch, UnableToDecodeIssuerPublicKey, UnableToDecryptCertificateSignature, UnableToGetIssuerCertificate, UnableToGetLocalIssuerCertificate, and UnableToVerifyFirstCertificate.
Referenced by QTlsPrivate::TlsCryptographOpenSSL::checkSslErrors(), and operator<<().
|
inline |
Returns true
if this error is not equal to other; otherwise returns false.
Definition at line 81 of file qsslerror.h.
References other().
Assigns the contents of other to this error.
Definition at line 155 of file qsslerror.cpp.
References other().
Definition at line 78 of file qsslerror.h.
References other(), and swap().
bool QSslError::operator== | ( | const QSslError & | other | ) | const |
Returns true
if this error is equal to other; otherwise returns false
.
Definition at line 174 of file qsslerror.cpp.
References other().
Swaps this error instance with other. This function is very fast and never fails.
Definition at line 74 of file qsslerror.h.