aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/x509/general_name.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/cryptography/x509/general_name.py b/src/cryptography/x509/general_name.py
index abf3a48a..3ad71e4c 100644
--- a/src/cryptography/x509/general_name.py
+++ b/src/cryptography/x509/general_name.py
@@ -123,7 +123,7 @@ class RFC822Name(object):
return not self == other
def __hash__(self):
- return hash(self.value)
+ return hash(self.bytes_value)
def _idna_encode(value):
@@ -205,6 +205,9 @@ class DNSName(object):
def __ne__(self, other):
return not self == other
+ def __hash__(self):
+ return hash(self.bytes_value)
+
@utils.register_interface(GeneralName)
class UniformResourceIdentifier(object):
@@ -306,7 +309,7 @@ class UniformResourceIdentifier(object):
return not self == other
def __hash__(self):
- return hash(self.value)
+ return hash(self.bytes_value)
@utils.register_interface(GeneralName)
@@ -331,6 +334,9 @@ class DirectoryName(object):
def __ne__(self, other):
return not self == other
+ def __hash__(self):
+ return hash(self.value)
+
@utils.register_interface(GeneralName)
class RegisteredID(object):
@@ -354,6 +360,9 @@ class RegisteredID(object):
def __ne__(self, other):
return not self == other
+ def __hash__(self):
+ return hash(self.value)
+
@utils.register_interface(GeneralName)
class IPAddress(object):
@@ -389,6 +398,9 @@ class IPAddress(object):
def __ne__(self, other):
return not self == other
+ def __hash__(self):
+ return hash(self.value)
+
@utils.register_interface(GeneralName)
class OtherName(object):
@@ -416,3 +428,6 @@ class OtherName(object):
def __ne__(self, other):
return not self == other
+
+ def __hash__(self):
+ return hash((self.type_id, self.value))