| 1 |
""" |
| 2 |
SignXML exception types. |
| 3 |
""" |
| 4 |
|
| 5 |
import cryptography.exceptions |
| 6 |
|
| 7 |
|
| 8 |
class SignXMLException(Exception): |
| 9 |
pass |
| 10 |
|
| 11 |
|
| 12 |
class InvalidSignature(cryptography.exceptions.InvalidSignature, SignXMLException): |
| 13 |
""" |
| 14 |
Raised when signature validation fails. |
| 15 |
""" |
| 16 |
|
| 17 |
|
| 18 |
class InvalidDigest(InvalidSignature): |
| 19 |
""" |
| 20 |
Raised when digest validation fails (causing the signature to be untrusted). |
| 21 |
""" |
| 22 |
|
| 23 |
|
| 24 |
class InvalidCertificate(InvalidSignature): |
| 25 |
""" |
| 26 |
Raised when certificate validation fails. |
| 27 |
""" |
| 28 |
|
| 29 |
|
| 30 |
class InvalidInput(ValueError, SignXMLException): |
| 31 |
pass |
| 32 |
|
| 33 |
|
| 34 |
class RedundantCert(SignXMLException): |
| 35 |
pass |