|  | Home · All Classes · Modules

# QSslError Class Reference
[QtNetwork module]

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

### Types

- enum SslError { UnspecifiedError, NoError, UnableToGetIssuerCertificate, UnableToDecryptCertificateSignature, ..., NoSslSupport }

### Methods

- __init__ (self)
- __init__ (self, SslError error)
- __init__ (self, SslError error, QSslCertificate certificate)
- __init__ (self, QSslError other)
- QSslCertificate certificate (self)
- SslError error (self)
- QString errorString (self)

### Special Methods

- bool __eq__ (self, QSslError other)
- bool __ne__ (self, QSslError other)

## Detailed Description

The QSslError class provides an SSL error.

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

## Type Documentation

### QSslError.SslError

Describes all recognized errors that can occur during an SSL handshake.

Constant | Value
--- | ---
`QSslError.NoError` | `0`
`QSslError.UnableToGetIssuerCertificate` | `1`
`QSslError.UnableToDecryptCertificateSignature` | `2`
`QSslError.UnableToDecodeIssuerPublicKey` | `3`
`QSslError.CertificateSignatureFailed` | `4`
`QSslError.CertificateNotYetValid` | `5`
`QSslError.CertificateExpired` | `6`
`QSslError.InvalidNotBeforeField` | `7`
`QSslError.InvalidNotAfterField` | `8`
`QSslError.SelfSignedCertificate` | `9`
`QSslError.SelfSignedCertificateInChain` | `10`
`QSslError.UnableToGetLocalIssuerCertificate` | `11`
`QSslError.UnableToVerifyFirstCertificate` | `12`
`QSslError.CertificateRevoked` | `13`
`QSslError.InvalidCaCertificate` | `14`
`QSslError.PathLengthExceeded` | `15`
`QSslError.InvalidPurpose` | `16`
`QSslError.CertificateUntrusted` | `17`
`QSslError.CertificateRejected` | `18`
`QSslError.SubjectIssuerMismatch` | `19`
`QSslError.AuthorityIssuerSerialNumberMismatch` | `20`
`QSslError.NoPeerCertificate` | `21`
`QSslError.HostNameMismatch` | `22`
`QSslError.UnspecifiedError` | `-1`
`QSslError.NoSslSupport` | `23`
`QSslError.CertificateBlacklisted` | `24`

See also QSslError.errorString().

## Method Documentation

### QSslError.__init__ (self)

Constructs a QSslError object with no error and default certificate.

### QSslError.__init__ (self, SslError error)

Constructs a QSslError object. The argument specifies the error that occurred.

### QSslError.__init__ (self, SslError error, QSslCertificate certificate)

Constructs a QSslError object. The two arguments specify the error that occurred, and which certificate the error relates to.

See also QSslCertificate.

### QSslError.__init__ (self, QSslError other)

Constructs an identical copy of other.

### QSslCertificate QSslError.certificate (self)

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

See also error() and errorString().

### SslError QSslError.error (self)

Returns the type of the error.

See also errorString() and certificate().

### QString QSslError.errorString (self)

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

See also error() and certificate().

### bool QSslError.__eq__ (self, QSslError other)

### bool QSslError.__ne__ (self, QSslError other)