Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QSslError Class Reference

The QSslError class provides an SSL error. More...

#include <qsslerror.h>

+ Collaboration diagram for QSslError:

Public Types

enum  SslError {
  NoError , UnableToGetIssuerCertificate , UnableToDecryptCertificateSignature , UnableToDecodeIssuerPublicKey ,
  CertificateSignatureFailed , CertificateNotYetValid , CertificateExpired , InvalidNotBeforeField ,
  InvalidNotAfterField , SelfSignedCertificate , SelfSignedCertificateInChain , UnableToGetLocalIssuerCertificate ,
  UnableToVerifyFirstCertificate , CertificateRevoked , InvalidCaCertificate , PathLengthExceeded ,
  InvalidPurpose , CertificateUntrusted , CertificateRejected , SubjectIssuerMismatch ,
  AuthorityIssuerSerialNumberMismatch , NoPeerCertificate , HostNameMismatch , NoSslSupport ,
  CertificateBlacklisted , CertificateStatusUnknown , OcspNoResponseFound , OcspMalformedRequest ,
  OcspMalformedResponse , OcspInternalError , OcspTryLater , OcspSigRequred ,
  OcspUnauthorized , OcspResponseCannotBeTrusted , OcspResponseCertIdUnknown , OcspResponseExpired ,
  OcspStatusUnknown , UnspecifiedError = -1
}
 Describes all recognized errors that can occur during an SSL handshake. More...
 

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.
 
QSslErroroperator= (QSslError &&other) noexcept
 
QSslErroroperator= (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.
 

Detailed Description

The QSslError class provides an SSL error.

Since
4.3

\reentrant

\inmodule QtNetwork

QSslError provides a simple API for managing errors during QSslSocket's SSL handshake.

See also
QSslSocket, QSslCertificate, QSslCipher

Definition at line 20 of file qsslerror.h.

Member Enumeration Documentation

◆ 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

See also
QSslError::errorString()
Enumerator
NoError 
UnableToGetIssuerCertificate 
UnableToDecryptCertificateSignature 
UnableToDecodeIssuerPublicKey 
CertificateSignatureFailed 
CertificateNotYetValid 
CertificateExpired 
InvalidNotBeforeField 
InvalidNotAfterField 
SelfSignedCertificate 
SelfSignedCertificateInChain 
UnableToGetLocalIssuerCertificate 
UnableToVerifyFirstCertificate 
CertificateRevoked 
InvalidCaCertificate 
PathLengthExceeded 
InvalidPurpose 
CertificateUntrusted 
CertificateRejected 
SubjectIssuerMismatch 
AuthorityIssuerSerialNumberMismatch 
NoPeerCertificate 
HostNameMismatch 
NoSslSupport 
CertificateBlacklisted 
CertificateStatusUnknown 
OcspNoResponseFound 
OcspMalformedRequest 
OcspMalformedResponse 
OcspInternalError 
OcspTryLater 
OcspSigRequred 
OcspUnauthorized 
OcspResponseCannotBeTrusted 
OcspResponseCertIdUnknown 
OcspResponseExpired 
OcspStatusUnknown 
UnspecifiedError 

Definition at line 24 of file qsslerror.h.

Constructor & Destructor Documentation

◆ QSslError() [1/4]

QSslError::QSslError ( )

Constructs a QSslError object with no error and default certificate.

Definition at line 102 of file qsslerror.cpp.

References NoError.

◆ QSslError() [2/4]

QSslError::QSslError ( SslError error)
explicit

Constructs a QSslError object.

The argument specifies the error that occurred.

Definition at line 114 of file qsslerror.cpp.

References error().

+ Here is the call graph for this function:

◆ QSslError() [3/4]

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.

See also
QSslCertificate

Definition at line 127 of file qsslerror.cpp.

References certificate(), and error().

+ Here is the call graph for this function:

◆ QSslError() [4/4]

QSslError::QSslError ( const QSslError & other)

Constructs an identical copy of other.

Definition at line 137 of file qsslerror.cpp.

References other().

+ Here is the call graph for this function:

◆ ~QSslError()

QSslError::~QSslError ( )

Destroys the QSslError object.

Definition at line 146 of file qsslerror.cpp.

Member Function Documentation

◆ certificate()

QSslCertificate QSslError::certificate ( ) const

Returns the certificate associated with this error, or a null certificate if the error does not relate to any certificate.

See also
error(), errorString()

Definition at line 329 of file qsslerror.cpp.

Referenced by QSslError().

+ Here is the caller graph for this function:

◆ error()

QSslError::SslError QSslError::error ( ) const

Returns the type of the error.

See also
errorString(), certificate()

Definition at line 193 of file qsslerror.cpp.

Referenced by QSslError(), and QSslError().

+ Here is the caller graph for this function:

◆ errorString()

◆ operator!=()

bool QSslError::operator!= ( const QSslError & other) const
inline
Since
4.4

Returns true if this error is not equal to other; otherwise returns false.

Definition at line 81 of file qsslerror.h.

References other().

+ Here is the call graph for this function:

◆ operator=() [1/2]

QSslError & QSslError::operator= ( const QSslError & other)
Since
4.4

Assigns the contents of other to this error.

Definition at line 155 of file qsslerror.cpp.

References other().

+ Here is the call graph for this function:

◆ operator=() [2/2]

QSslError & QSslError::operator= ( QSslError && other)
inlinenoexcept

Definition at line 78 of file qsslerror.h.

References other(), and swap().

+ Here is the call graph for this function:

◆ operator==()

bool QSslError::operator== ( const QSslError & other) const
Since
4.4

Returns true if this error is equal to other; otherwise returns false.

Definition at line 174 of file qsslerror.cpp.

References other().

+ Here is the call graph for this function:

◆ swap()

void QSslError::swap ( QSslError & other)
inlinenoexcept
Since
5.0

Swaps this error instance with other. This function is very fast and never fails.

Definition at line 74 of file qsslerror.h.

References d, and other().

+ Here is the call graph for this function:

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