Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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.
 

Friends

Q_NETWORK_EXPORT friend QDebug print (QDebug debug, QSslError::SslError error)
 
QDebug operator<< (QDebug debug, SslError error)
 

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 24 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 28 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.

◆ QSslError() [2/4]

QSslError::QSslError ( SslError error)
explicit

Constructs a QSslError object.

The argument specifies the error that occurred.

Definition at line 112 of file qsslerror.cpp.

◆ 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 124 of file qsslerror.cpp.

◆ QSslError() [4/4]

QSslError::QSslError ( const QSslError & other)

Constructs an identical copy of other.

Definition at line 134 of file qsslerror.cpp.

◆ ~QSslError()

QSslError::~QSslError ( )

Destroys the QSslError object.

Definition at line 143 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 324 of file qsslerror.cpp.

◆ error()

QSslError::SslError QSslError::error ( ) const

Returns the type of the error.

See also
errorString(), certificate()

Definition at line 188 of file qsslerror.cpp.

◆ errorString()

QString QSslError::errorString ( ) const

Returns a short localized human-readable description of the error.

See also
error(), certificate()

Definition at line 198 of file qsslerror.cpp.

◆ 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 85 of file qsslerror.h.

◆ operator=() [1/2]

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

Assigns the contents of other to this error.

Definition at line 152 of file qsslerror.cpp.

◆ operator=() [2/2]

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

Definition at line 82 of file qsslerror.h.

◆ 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 169 of file qsslerror.cpp.

◆ swap()

void QSslError::swap ( QSslError & other)
inlinenoexcept
Since
5.0 \memberswap{error instance}

Definition at line 78 of file qsslerror.h.

Friends And Related Symbol Documentation

◆ operator<<

QDebug operator<< ( QDebug debug,
SslError error )
friend

Definition at line 97 of file qsslerror.h.

◆ print

Q_NETWORK_EXPORT friend QDebug print ( QDebug debug,
QSslError::SslError error )
friend

Definition at line 350 of file qsslerror.cpp.


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