summaryrefslogtreecommitdiff
path: root/src/service_identity/exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/service_identity/exceptions.py')
-rw-r--r--src/service_identity/exceptions.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/service_identity/exceptions.py b/src/service_identity/exceptions.py
index 1dfc108..852abc1 100644
--- a/src/service_identity/exceptions.py
+++ b/src/service_identity/exceptions.py
@@ -10,7 +10,7 @@ from __future__ import absolute_import, division, print_function
import attr
-class SubjectAltNameWarning(Warning):
+class SubjectAltNameWarning(DeprecationWarning):
"""
Server Certificate does not contain a ``SubjectAltName``.
@@ -23,6 +23,7 @@ class VerificationError(Exception):
"""
Service identity verification failed.
"""
+
errors = attr.ib()
def __str__(self):
@@ -32,24 +33,36 @@ class VerificationError(Exception):
@attr.s
class DNSMismatch(object):
"""
- Not matching DNSPattern could be found.
+ No matching DNSPattern could be found.
"""
+
mismatched_id = attr.ib()
@attr.s
class SRVMismatch(object):
"""
- Not matching SRVPattern could be found.
+ No matching SRVPattern could be found.
"""
+
mismatched_id = attr.ib()
@attr.s
class URIMismatch(object):
"""
- Not matching URIPattern could be found.
+ No matching URIPattern could be found.
"""
+
+ mismatched_id = attr.ib()
+
+
+@attr.s
+class IPAddressMismatch(object):
+ """
+ No matching IPAddressPattern could be found.
+ """
+
mismatched_id = attr.ib()