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/plugins/service.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ipalib/plugins/service.py') diff --git a/ipalib/plugins/service.py b/ipalib/plugins/service.py index 93b9e2b7..5b011915 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' -- cgit