diff options
author | Rob Crittenden <rcritten@redhat.com> | 2009-12-17 11:30:14 -0500 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2009-12-18 05:18:50 -0700 |
commit | af20a1a2da19a43d2dd7a28c596c0e2f908e8d3e (patch) | |
tree | c5d1fad8b9a8d3be9728f98d9aa7bdbac26c9648 /ipalib/plugins/service.py | |
parent | 29f243bf4e2f6cd82362849872d1481dab8543b8 (diff) | |
download | freeipa-af20a1a2da19a43d2dd7a28c596c0e2f908e8d3e.tar.gz freeipa-af20a1a2da19a43d2dd7a28c596c0e2f908e8d3e.tar.xz freeipa-af20a1a2da19a43d2dd7a28c596c0e2f908e8d3e.zip |
Handle base64-encoded certificates better, import missing function
Diffstat (limited to 'ipalib/plugins/service.py')
-rw-r--r-- | ipalib/plugins/service.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ipalib/plugins/service.py b/ipalib/plugins/service.py index f65ab3ebd..8c962f091 100644 --- a/ipalib/plugins/service.py +++ b/ipalib/plugins/service.py @@ -38,6 +38,11 @@ def get_serial(certificate): if type(certificate) in (list, tuple): certificate = certificate[0] try: + certificate = base64.b64decode(certificate) + except Exception: + pass + + try: serial = x509.get_serial_number(certificate, type=x509.DER) except PyAsn1Error: raise errors.GenericError( |