diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-09-04 19:18:43 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-09-04 19:18:43 +0200 |
commit | d9a731b23a930474adc35d6b4ebee68cd05a0940 (patch) | |
tree | 42f4acd23e800c2bf36bcfc27c8c119e49f7ecc2 /netlib/certutils.py | |
parent | ef0e501877e74ba659be08d7d8b0781baff08598 (diff) | |
download | mitmproxy-d9a731b23a930474adc35d6b4ebee68cd05a0940.tar.gz mitmproxy-d9a731b23a930474adc35d6b4ebee68cd05a0940.tar.bz2 mitmproxy-d9a731b23a930474adc35d6b4ebee68cd05a0940.zip |
make inequality comparison work
Diffstat (limited to 'netlib/certutils.py')
-rw-r--r-- | netlib/certutils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/netlib/certutils.py b/netlib/certutils.py index 18179917..84316882 100644 --- a/netlib/certutils.py +++ b/netlib/certutils.py @@ -285,6 +285,9 @@ class SSLCert: def __eq__(self, other): return self.digest("sha1") == other.digest("sha1") + def __ne__(self, other): + return not self.__eq__(other) + @classmethod def from_pem(klass, txt): x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, txt) |