tlslite.errors module
Exception classes.
- exception tlslite.errors.BaseTLSException
Bases:
Exception
Metaclass for TLS Lite exceptions.
Look to
tlslite.errors.TLSError
for exceptions that should be caught by tlslite consumers
- exception tlslite.errors.EncodingError
Bases:
EncryptionError
An error appeared while encoding
- exception tlslite.errors.EncryptionError
Bases:
BaseTLSException
Base class for exceptions thrown while encrypting.
- exception tlslite.errors.InvalidSignature
Bases:
EncryptionError
Verification function found invalid signature
- exception tlslite.errors.MaskTooLongError
Bases:
EncryptionError
The maskLen passed into function is too high
- exception tlslite.errors.MessageTooLongError
Bases:
EncryptionError
The message passed into function is too long
- exception tlslite.errors.TLSAbruptCloseError
Bases:
TLSError
The socket was closed without a proper TLS shutdown.
The TLS specification mandates that an alert of some sort must be sent before the underlying socket is closed. If the socket is closed without this, it could signify that an attacker is trying to truncate the connection. It could also signify a misbehaving TLS implementation, or a random network failure.
- exception tlslite.errors.TLSAuthenticationError
Bases:
TLSError
The handshake succeeded, but the other party’s authentication was inadequate.
This exception will only be raised when a
tlslite.Checker.Checker
has been passed to a handshake function. The Checker will be invoked once the handshake completes, and if the Checker objects to how the other party authenticated, a subclass of this exception will be raised.
- exception tlslite.errors.TLSAuthenticationTypeError
Bases:
TLSAuthenticationError
The Checker was expecting the other party to authenticate with a different type of certificate chain.
- exception tlslite.errors.TLSAuthorizationError
Bases:
TLSAuthenticationError
The Checker was expecting the other party to authenticate with a certificate chain that has a different authorization.
- exception tlslite.errors.TLSBadRecordMAC
Bases:
TLSProtocolException
Bad MAC (or padding in case of mac-then-encrypt)
- exception tlslite.errors.TLSClosedConnectionError
-
An attempt was made to use the connection after it was closed.
- exception tlslite.errors.TLSDecodeError
Bases:
TLSProtocolException
The received message encoding does not match specification.
- exception tlslite.errors.TLSDecryptionFailed
Bases:
TLSProtocolException
Decryption of data was unsuccessful
- exception tlslite.errors.TLSError
Bases:
BaseTLSException
Base class for all TLS Lite exceptions.
- __str__()
At least print out the Exception time for str(…).
- exception tlslite.errors.TLSFaultError
Bases:
TLSError
The other party responded incorrectly to an induced fault.
This exception will only occur during fault testing, when a
tlslite.tlsconnection.TLSConnection
’s fault variable is set to induce some sort of faulty behavior, and the other party doesn’t respond appropriately.
- exception tlslite.errors.TLSFingerprintError
Bases:
TLSAuthenticationError
The Checker was expecting the other party to authenticate with a certificate chain that matches a different fingerprint.
- exception tlslite.errors.TLSHandshakeFailure
Bases:
TLSProtocolException
Could not find acceptable set of handshake parameters
- exception tlslite.errors.TLSIllegalParameterException
Bases:
TLSProtocolException
Parameters specified in message were incorrect or invalid
- exception tlslite.errors.TLSInsufficientSecurity
Bases:
TLSProtocolException
Parameters selected by user are too weak
- exception tlslite.errors.TLSInternalError
Bases:
TLSError
The internal state of object is unexpected or invalid.
Caused by incorrect use of API.
- exception tlslite.errors.TLSLocalAlert(alert, message=None)
Bases:
TLSAlert
A TLS alert has been signalled by the local implementation.
- Variables:
description (int) – Set to one of the constants in
tlslite.constants.AlertDescription
level (int) – Set to one of the constants in
tlslite.constants.AlertLevel
message (str) – Description of what went wrong.
- __init__(alert, message=None)
- __str__()
At least print out the Exception time for str(…).
- exception tlslite.errors.TLSNoAuthenticationError
Bases:
TLSAuthenticationError
The Checker was expecting the other party to authenticate with a certificate chain, but this did not occur.
- exception tlslite.errors.TLSProtocolException
Bases:
BaseTLSException
Exceptions used internally for handling errors in received messages
- exception tlslite.errors.TLSRecordOverflow
Bases:
TLSProtocolException
The received record size was too big
- exception tlslite.errors.TLSRemoteAlert(alert)
Bases:
TLSAlert
A TLS alert has been signalled by the remote implementation.
- Variables:
description (int) – Set to one of the constants in
tlslite.constants.AlertDescription
level (int) – Set to one of the constants in
tlslite.constants.AlertLevel
- __init__(alert)
- __str__()
At least print out the Exception time for str(…).
- exception tlslite.errors.TLSUnexpectedMessage
Bases:
TLSProtocolException
The received message was unexpected or parsing of Inner Plaintext failed
- exception tlslite.errors.TLSUnknownPSKIdentity
Bases:
TLSProtocolException
The PSK or SRP identity is unknown
- exception tlslite.errors.TLSUnsupportedError
Bases:
TLSError
The implementation doesn’t support the requested (or required) capabilities.
- exception tlslite.errors.TLSValidationError(msg, info=None)
Bases:
TLSAuthenticationError
The Checker has determined that the other party’s certificate chain is invalid.
- __init__(msg, info=None)
- exception tlslite.errors.UnknownRSAType
Bases:
EncryptionError
Unknown RSA algorithm type passed