diff options
Diffstat (limited to 'ipalib/plugins/service.py')
-rw-r--r-- | ipalib/plugins/service.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ipalib/plugins/service.py b/ipalib/plugins/service.py index 93b9e2b70..5b0119151 100644 --- a/ipalib/plugins/service.py +++ b/ipalib/plugins/service.py @@ -32,12 +32,13 @@ from pyasn1.error import PyAsn1Error def get_serial(certificate): """ - Given a certificate, return the serial number in that cert. + Given a certificate, return the serial number in that + cert as a Python long object. """ if type(certificate) in (list, tuple): certificate = certificate[0] try: - serial = str(x509.get_serial_number(certificate, type=x509.DER)) + serial = x509.get_serial_number(certificate, type=x509.DER) except PyAsn1Error: raise errors.GenericError( format='Unable to decode certificate in entry' |