diff options
-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. |