diff options
author | Rob Austein <sra@hactrn.net> | 2007-10-07 05:14:33 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-10-07 05:14:33 +0000 |
commit | 575da9018b1722fe57ba986e67412c34ba83b7ce (patch) | |
tree | 59b091768db63f0f92b2f621596a1ab3973ae335 | |
parent | a07460d4ce12b03e207198f8a7aaefe4ba4d1fa7 (diff) |
DER_object.__cmp__()
svn path=/scripts/rpki/x509.py; revision=1109
-rw-r--r-- | scripts/rpki/x509.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/rpki/x509.py b/scripts/rpki/x509.py index 9589388f..a18cfd2b 100644 --- a/scripts/rpki/x509.py +++ b/scripts/rpki/x509.py @@ -128,6 +128,10 @@ class DER_object(object): """Get the PEM representation of this object.""" return self.pem_converter.to_PEM(self.get_DER()) + def __cmp__(self, other): + """Compare two DER-encoded objects.""" + return cmp(self.get_DER(), other.get_DER()) + class X509(DER_object): """X.509 certificates. |