summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/service.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/plugins/service.py')
-rw-r--r--ipalib/plugins/service.py5
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(