From ee909d871c56e55584ace7850ee3c6276ad58d06 Mon Sep 17 00:00:00 2001 From: John Dennis Date: Tue, 8 Dec 2009 16:57:07 -0500 Subject: rebase dogtag clean-up patch --- ipalib/x509.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ipalib/x509.py') diff --git a/ipalib/x509.py b/ipalib/x509.py index 1db25d06f..b570d0758 100644 --- a/ipalib/x509.py +++ b/ipalib/x509.py @@ -188,8 +188,9 @@ class Certificate(univ.Sequence): return info.getComponentByName('subject') def get_serial_number(self): + 'return the serial number as a Python long object' info = self.getComponentByName('tbsCertificate') - return info.getComponentByName('serialNumber') + return long(info.getComponentByName('serialNumber')) # end of ASN.1 data structures @@ -230,9 +231,7 @@ def get_subject_components(certificate, type=PEM): def get_serial_number(certificate, type=PEM): """ - Return the serial number of a certificate. - - Returns an integer + Return the serial number of a certificate as a Python long object. """ x509cert = load_certificate(certificate, type) return x509cert.get_serial_number() -- cgit