OLD | NEW |
1 """Exception classes. | 1 """Exception classes. |
2 @sort: TLSError, TLSAbruptCloseError, TLSAlert, TLSLocalAlert, TLSRemoteAlert, | 2 @sort: TLSError, TLSAbruptCloseError, TLSAlert, TLSLocalAlert, TLSRemoteAlert, |
3 TLSAuthenticationError, TLSNoAuthenticationError, TLSAuthenticationTypeError, | 3 TLSAuthenticationError, TLSNoAuthenticationError, TLSAuthenticationTypeError, |
4 TLSFingerprintError, TLSAuthorizationError, TLSValidationError, TLSFaultError | 4 TLSFingerprintError, TLSAuthorizationError, TLSValidationError, TLSFaultError |
5 """ | 5 """ |
6 | 6 |
7 from constants import AlertDescription, AlertLevel | 7 from constants import AlertDescription, AlertLevel |
8 | 8 |
9 class TLSError(Exception): | 9 class TLSError(Exception): |
10 """Base class for all TLS Lite exceptions.""" | 10 """Base class for all TLS Lite exceptions.""" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 AlertDescription.unknown_ca: "unknown_ca",\ | 43 AlertDescription.unknown_ca: "unknown_ca",\ |
44 AlertDescription.access_denied: "access_denied",\ | 44 AlertDescription.access_denied: "access_denied",\ |
45 AlertDescription.decode_error: "decode_error",\ | 45 AlertDescription.decode_error: "decode_error",\ |
46 AlertDescription.decrypt_error: "decrypt_error",\ | 46 AlertDescription.decrypt_error: "decrypt_error",\ |
47 AlertDescription.export_restriction: "export_restriction",\ | 47 AlertDescription.export_restriction: "export_restriction",\ |
48 AlertDescription.protocol_version: "protocol_version",\ | 48 AlertDescription.protocol_version: "protocol_version",\ |
49 AlertDescription.insufficient_security: "insufficient_security",\ | 49 AlertDescription.insufficient_security: "insufficient_security",\ |
50 AlertDescription.internal_error: "internal_error",\ | 50 AlertDescription.internal_error: "internal_error",\ |
51 AlertDescription.user_canceled: "user_canceled",\ | 51 AlertDescription.user_canceled: "user_canceled",\ |
52 AlertDescription.no_renegotiation: "no_renegotiation",\ | 52 AlertDescription.no_renegotiation: "no_renegotiation",\ |
53 AlertDescription.unknown_srp_username: "unknown_srp_username",\ | 53 AlertDescription.unknown_psk_identity: "unknown_psk_identity", |
54 AlertDescription.missing_srp_username: "missing_srp_username"} | 54 } |
55 | 55 |
56 class TLSLocalAlert(TLSAlert): | 56 class TLSLocalAlert(TLSAlert): |
57 """A TLS alert has been signalled by the local implementation. | 57 """A TLS alert has been signalled by the local implementation. |
58 | 58 |
59 @type description: int | 59 @type description: int |
60 @ivar description: Set to one of the constants in | 60 @ivar description: Set to one of the constants in |
61 L{tlslite.constants.AlertDescription} | 61 L{tlslite.constants.AlertDescription} |
62 | 62 |
63 @type level: int | 63 @type level: int |
64 @ivar level: Set to one of the constants in | 64 @ivar level: Set to one of the constants in |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 pass | 140 pass |
141 | 141 |
142 class TLSFaultError(TLSError): | 142 class TLSFaultError(TLSError): |
143 """The other party responded incorrectly to an induced fault. | 143 """The other party responded incorrectly to an induced fault. |
144 | 144 |
145 This exception will only occur during fault testing, when a | 145 This exception will only occur during fault testing, when a |
146 TLSConnection's fault variable is set to induce some sort of | 146 TLSConnection's fault variable is set to induce some sort of |
147 faulty behavior, and the other party doesn't respond appropriately. | 147 faulty behavior, and the other party doesn't respond appropriately. |
148 """ | 148 """ |
149 pass | 149 pass |
OLD | NEW |