2014-11-21 13:10:33 -05:00
|
|
|
"""Let's Encrypt client errors."""
|
|
|
|
|
|
|
|
|
|
|
2015-06-12 10:10:39 -04:00
|
|
|
class Error(Exception):
|
2014-11-21 13:10:33 -05:00
|
|
|
"""Generic Let's Encrypt client error."""
|
2014-11-29 19:05:18 -05:00
|
|
|
|
|
|
|
|
|
2015-06-12 10:10:39 -04:00
|
|
|
class ReverterError(Error):
|
2015-01-19 06:15:31 -05:00
|
|
|
"""Let's Encrypt Reverter error."""
|
|
|
|
|
|
|
|
|
|
|
2015-01-29 22:35:31 -05:00
|
|
|
# Auth Handler Errors
|
2015-06-12 10:10:39 -04:00
|
|
|
class AuthorizationError(Error):
|
2015-04-13 20:33:11 -04:00
|
|
|
"""Authorization error."""
|
2015-01-10 08:19:22 -05:00
|
|
|
|
|
|
|
|
|
2015-06-23 16:10:20 -04:00
|
|
|
class FailedChallenges(AuthorizationError):
|
|
|
|
|
"""Failed challenges error.
|
|
|
|
|
|
|
|
|
|
:ivar set failed_achalls: Failed `.AnnotatedChallenge` instances.
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
def __init__(self, failed_achalls):
|
|
|
|
|
assert failed_achalls
|
|
|
|
|
self.failed_achalls = failed_achalls
|
|
|
|
|
super(FailedChallenges, self).__init__()
|
|
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
|
return "Failed authorization procedure. {0}".format(
|
|
|
|
|
", ".join(
|
|
|
|
|
"{0} ({1}): {2}".format(achall.domain, achall.typ, achall.error)
|
|
|
|
|
for achall in self.failed_achalls if achall.error is not None))
|
|
|
|
|
|
|
|
|
|
|
2015-06-12 10:10:39 -04:00
|
|
|
class ContAuthError(AuthorizationError):
|
2015-04-13 20:33:11 -04:00
|
|
|
"""Let's Encrypt Continuity Authenticator error."""
|
2015-01-10 08:19:22 -05:00
|
|
|
|
|
|
|
|
|
2015-06-12 10:10:39 -04:00
|
|
|
class DvAuthError(AuthorizationError):
|
2015-01-29 22:35:31 -05:00
|
|
|
"""Let's Encrypt DV Authenticator error."""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Authenticator - Challenge specific errors
|
2015-06-12 10:10:39 -04:00
|
|
|
class DvsniError(DvAuthError):
|
2015-01-29 22:35:31 -05:00
|
|
|
"""Let's Encrypt DVSNI error."""
|
|
|
|
|
|
|
|
|
|
|
2015-06-26 12:29:40 -04:00
|
|
|
# Plugin Errors
|
|
|
|
|
class PluginError(Error):
|
|
|
|
|
"""Let's Encrypt Plugin error."""
|
2014-12-03 07:31:01 -05:00
|
|
|
|
|
|
|
|
|
2015-06-26 12:29:40 -04:00
|
|
|
class NoInstallationError(PluginError):
|
2015-01-24 05:15:23 -05:00
|
|
|
"""Let's Encrypt No Installation error."""
|
|
|
|
|
|
|
|
|
|
|
2015-06-26 12:29:40 -04:00
|
|
|
class MisconfigurationError(PluginError):
|
2015-01-24 05:15:23 -05:00
|
|
|
"""Let's Encrypt Misconfiguration error."""
|
2015-01-19 06:15:31 -05:00
|
|
|
|
2015-02-09 04:43:54 -05:00
|
|
|
|
2015-06-12 10:10:39 -04:00
|
|
|
class RevokerError(Error):
|
2015-02-09 05:47:45 -05:00
|
|
|
"""Let's Encrypt Revoker error."""
|