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 2a2c278d4..bac58d30e 100644
--- a/ipalib/plugins/service.py
+++ b/ipalib/plugins/service.py
@@ -177,6 +177,11 @@ def normalize_certificate(cert):
if not cert:
return cert
+ s = cert.find('-----BEGIN CERTIFICATE-----')
+ if s > -1:
+ e = cert.find('-----END CERTIFICATE-----')
+ cert = cert[s+27:e]
+
if util.isvalid_base64(cert):
try:
cert = base64.b64decode(cert)