mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-08-16 16:04:53 -05:00
rebase dogtag clean-up patch
This commit is contained in:
committed by
Jason Gerard DeRose
parent
62d40286ac
commit
ee909d871c
+3
-4
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user