# eric6.E5Network.E5SslErrorHandler

Module implementing a SSL error handler.

### Global Attributes

None

### Classes

E5SslErrorHandler | Class implementing a handler for SSL errors.

### Functions

None

## E5SslErrorHandler

Class implementing a handler for SSL errors.

It also initializes the default SSL configuration with certificates permanently accepted by the user already.

### Derived from

QObject

### Class Attributes

NotIgnored
SystemIgnored
UserIgnored

### Class Methods

None

### Methods

E5SslErrorHandler | Constructor
__certToString | Private method to convert a certificate to a formatted string.
__getSystemCaCertificates | Private method to get the list of system certificates.
sslErrors | Public method to handle SSL errors.
sslErrorsReply | Public slot to handle SSL errors for a network reply.
sslErrorsReplySlot | Public slot to handle SSL errors for a network reply.

### Static Methods

None

#### E5SslErrorHandler (Constructor)

E5SslErrorHandler(parent=None)

Constructor

parent
  reference to the parent object (QObject)

#### E5SslErrorHandler.__certToString

__certToString(cert)

Private method to convert a certificate to a formatted string.

cert
  certificate to convert (QSslCertificate)

Returns:
  formatted string (string)

#### E5SslErrorHandler.__getSystemCaCertificates

__getSystemCaCertificates()

Private method to get the list of system certificates.

Returns:
  list of system certificates (list of QSslCertificate)

#### E5SslErrorHandler.sslErrors

sslErrors(errors, server, port=-1)

Public method to handle SSL errors.

errors
  list of SSL errors (list of QSslError)
server
  name of the server (string)
port=
  value of the port (integer)

Returns:
  tuple indicating to ignore the SSL errors (one of NotIgnored, SystemIgnored or UserIgnored) and indicating a change of the default SSL configuration (boolean)

#### E5SslErrorHandler.sslErrorsReply

sslErrorsReply(reply, errors)

Public slot to handle SSL errors for a network reply.

reply
  reference to the reply object (QNetworkReply)
errors
  list of SSL errors (list of QSslError)

Returns:
  tuple indicating to ignore the SSL errors (one of NotIgnored, SystemIgnored or UserIgnored) and indicating a change of the default SSL configuration (boolean)

#### E5SslErrorHandler.sslErrorsReplySlot

sslErrorsReplySlot(reply, errors)

Public slot to handle SSL errors for a network reply.

reply
  reference to the reply object (QNetworkReply)
errors
  list of SSL errors (list of QSslError)

Up