tlslite.errors module¶
Exception classes.
- exception tlslite.errors.BaseTLSException¶
Bases:
ExceptionMetaclass for TLS Lite exceptions.
Look to
tlslite.errors.TLSErrorfor exceptions that should be caught by tlslite consumers
- exception tlslite.errors.EncodingError¶
Bases:
EncryptionErrorAn error appeared while encoding
- exception tlslite.errors.EncryptionError¶
Bases:
BaseTLSExceptionBase class for exceptions thrown while encrypting.
- exception tlslite.errors.InvalidSignature¶
Bases:
EncryptionErrorVerification function found invalid signature
- exception tlslite.errors.MaskTooLongError¶
Bases:
EncryptionErrorThe maskLen passed into function is too high
- exception tlslite.errors.MessageTooLongError¶
Bases:
EncryptionErrorThe message passed into function is too long
- exception tlslite.errors.TLSAbruptCloseError¶
Bases:
TLSErrorThe 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:
TLSErrorThe handshake succeeded, but the other party’s authentication was inadequate.
This exception will only be raised when a
tlslite.Checker.Checkerhas 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:
TLSAuthenticationErrorThe Checker was expecting the other party to authenticate with a different type of certificate chain.
- exception tlslite.errors.TLSAuthorizationError¶
Bases:
TLSAuthenticationErrorThe Checker was expecting the other party to authenticate with a certificate chain that has a different authorization.
- exception tlslite.errors.TLSBadRecordMAC¶
Bases:
TLSProtocolExceptionBad MAC (or padding in case of mac-then-encrypt)
- exception tlslite.errors.TLSClosedConnectionError¶
Bases:
TLSError,OSErrorAn attempt was made to use the connection after it was closed.
- exception tlslite.errors.TLSDecodeError¶
Bases:
TLSProtocolExceptionThe received message encoding does not match specification.
- exception tlslite.errors.TLSDecryptionFailed¶
Bases:
TLSProtocolExceptionDecryption of data was unsuccessful
- exception tlslite.errors.TLSError¶
Bases:
BaseTLSExceptionBase class for all TLS Lite exceptions.
- __str__()¶
At least print out the Exception time for str(…).
- exception tlslite.errors.TLSFaultError¶
Bases:
TLSErrorThe 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:
TLSAuthenticationErrorThe Checker was expecting the other party to authenticate with a certificate chain that matches a different fingerprint.
- exception tlslite.errors.TLSHandshakeFailure¶
Bases:
TLSProtocolExceptionCould not find acceptable set of handshake parameters
- exception tlslite.errors.TLSIllegalParameterException¶
Bases:
TLSProtocolExceptionParameters specified in message were incorrect or invalid
- exception tlslite.errors.TLSInsufficientSecurity¶
Bases:
TLSProtocolExceptionParameters selected by user are too weak
- exception tlslite.errors.TLSInternalError¶
Bases:
TLSErrorThe internal state of object is unexpected or invalid.
Caused by incorrect use of API.
- exception tlslite.errors.TLSLocalAlert(alert, message=None)¶
Bases:
TLSAlertA TLS alert has been signalled by the local implementation.
- Variables:
description (int) – Set to one of the constants in
tlslite.constants.AlertDescriptionlevel (int) – Set to one of the constants in
tlslite.constants.AlertLevelmessage (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:
TLSAuthenticationErrorThe Checker was expecting the other party to authenticate with a certificate chain, but this did not occur.
- exception tlslite.errors.TLSProtocolException¶
Bases:
BaseTLSExceptionExceptions used internally for handling errors in received messages
- exception tlslite.errors.TLSRecordOverflow¶
Bases:
TLSProtocolExceptionThe received record size was too big
- exception tlslite.errors.TLSRemoteAlert(alert)¶
Bases:
TLSAlertA TLS alert has been signalled by the remote implementation.
- Variables:
description (int) – Set to one of the constants in
tlslite.constants.AlertDescriptionlevel (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.TLSUnknownPSKIdentity¶
Bases:
TLSProtocolExceptionThe PSK or SRP identity is unknown
- exception tlslite.errors.TLSUnsupportedError¶
Bases:
TLSErrorThe implementation doesn’t support the requested (or required) capabilities.
- exception tlslite.errors.TLSValidationError(msg, info=None)¶
Bases:
TLSAuthenticationErrorThe Checker has determined that the other party’s certificate chain is invalid.
- __init__(msg, info=None)¶
- exception tlslite.errors.UnknownRSAType¶
Bases:
EncryptionErrorUnknown RSA algorithm type passed