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 30 matching lines...) Expand all Loading... |
41 AlertDescription.certificate_unknown: "certificate_unknown",\ | 41 AlertDescription.certificate_unknown: "certificate_unknown",\ |
42 AlertDescription.illegal_parameter: "illegal_parameter",\ | 42 AlertDescription.illegal_parameter: "illegal_parameter",\ |
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.inappropriate_fallback: "inappropriate_fallback",\ |
51 AlertDescription.user_canceled: "user_canceled",\ | 52 AlertDescription.user_canceled: "user_canceled",\ |
52 AlertDescription.no_renegotiation: "no_renegotiation",\ | 53 AlertDescription.no_renegotiation: "no_renegotiation",\ |
53 AlertDescription.unknown_srp_username: "unknown_srp_username",\ | 54 AlertDescription.unknown_srp_username: "unknown_srp_username",\ |
54 AlertDescription.missing_srp_username: "missing_srp_username"} | 55 AlertDescription.missing_srp_username: "missing_srp_username"} |
55 | 56 |
56 class TLSLocalAlert(TLSAlert): | 57 class TLSLocalAlert(TLSAlert): |
57 """A TLS alert has been signalled by the local implementation. | 58 """A TLS alert has been signalled by the local implementation. |
58 | 59 |
59 @type description: int | 60 @type description: int |
60 @ivar description: Set to one of the constants in | 61 @ivar description: Set to one of the constants in |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 pass | 141 pass |
141 | 142 |
142 class TLSFaultError(TLSError): | 143 class TLSFaultError(TLSError): |
143 """The other party responded incorrectly to an induced fault. | 144 """The other party responded incorrectly to an induced fault. |
144 | 145 |
145 This exception will only occur during fault testing, when a | 146 This exception will only occur during fault testing, when a |
146 TLSConnection's fault variable is set to induce some sort of | 147 TLSConnection's fault variable is set to induce some sort of |
147 faulty behavior, and the other party doesn't respond appropriately. | 148 faulty behavior, and the other party doesn't respond appropriately. |
148 """ | 149 """ |
149 pass | 150 pass |
OLD | NEW |