]> git.ipfire.org Git - oddments/ddns.git/blobdiff - src/ddns/errors.py
Catch SSL errors
[oddments/ddns.git] / src / ddns / errors.py
index 26bc18ec46d508c02bbd6836d3cce18495e79bd5..58a5ba9beb0e0342d51d21dc7e140c3cbc591483 100644 (file)
@@ -64,6 +64,13 @@ class DDNSBlockedError(DDNSError):
        reason = N_("The server denies any updates from this client")
 
 
+class DDNSCertificateError(DDNSError):
+       """
+               Thrown when a server presented an invalid certificate.
+       """
+       reason = N_("Invalid certificate")
+
+
 class DDNSConfigurationError(DDNSError):
        """
                Thrown when invalid or insufficient
@@ -139,6 +146,14 @@ class DDNSResolveError(DDNSNetworkError):
        reason = N_("Could not resolve DNS entry")
 
 
+class DDNSSSLError(DDNSNetworkError):
+       """
+               Raised when a SSL connection could not be
+               negotiated.
+       """
+       reason = N_("SSL negotiation error")
+
+
 class DDNSServiceUnavailableError(DDNSNetworkError):
        """
                Equivalent to HTTP error code 503.