diff options
author | John Dennis <jdennis@redhat.com> | 2009-12-08 16:57:07 -0500 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2009-12-09 01:57:08 -0700 |
commit | ee909d871c56e55584ace7850ee3c6276ad58d06 (patch) | |
tree | 7df2f0be1a1d8af0b8f99576db8393056c581d50 /ipalib/x509.py | |
parent | 62d40286ac67faa6b009e121035f92afa1372cf3 (diff) | |
download | freeipa-ee909d871c56e55584ace7850ee3c6276ad58d06.tar.gz freeipa-ee909d871c56e55584ace7850ee3c6276ad58d06.tar.xz freeipa-ee909d871c56e55584ace7850ee3c6276ad58d06.zip |
rebase dogtag clean-up patch
Diffstat (limited to 'ipalib/x509.py')
-rw-r--r-- | ipalib/x509.py | 7 |
1 files changed, 3 insertions, 4 deletions
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() |