diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/x509.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py index b0a4a352..89b9162b 100644 --- a/src/cryptography/x509.py +++ b/src/cryptography/x509.py @@ -333,6 +333,15 @@ class BasicConstraints(object): return ("<BasicConstraints(ca={0.ca}, " "path_length={0.path_length})>").format(self) + def __eq__(self, other): + if not isinstance(other, BasicConstraints): + return NotImplemented + + return self.ca == other.ca and self.path_length == other.path_length + + def __ne__(self, other): + return not self == other + class KeyUsage(object): def __init__(self, digital_signature, content_commitment, key_encipherment, |