diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/x509/extensions.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cryptography/x509/extensions.py b/src/cryptography/x509/extensions.py index 01378b38..8880f744 100644 --- a/src/cryptography/x509/extensions.py +++ b/src/cryptography/x509/extensions.py @@ -213,6 +213,15 @@ class AuthorityKeyIdentifier(object): def __ne__(self, other): return not self == other + def __hash__(self): + if self.authority_cert_issuer is None: + aci = None + else: + aci = tuple(self.authority_cert_issuer) + return hash(( + self.key_identifier, aci, self.authority_cert_serial_number + )) + key_identifier = utils.read_only_property("_key_identifier") authority_cert_issuer = utils.read_only_property("_authority_cert_issuer") authority_cert_serial_number = utils.read_only_property( |