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.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/ipalib/plugins/service.py b/ipalib/plugins/service.py
index d72a42dc..b8312ba5 100644
--- a/ipalib/plugins/service.py
+++ b/ipalib/plugins/service.py
@@ -199,9 +199,15 @@ class service_del(LDAPDelete):
if cert:
serial = unicode(get_serial(cert))
try:
- self.api.Command['cert_revoke'](serial, revocation_reason=5)
+ result = api.Command['cert_get'](unicode(serial))['result']
+ if 'revocation_reason' not in result:
+ try:
+ api.Command['cert_revoke'](unicode(serial), revocation_reason=4)
+ except errors.NotImplementedError:
+ # some CA's might not implement revoke
+ pass
except errors.NotImplementedError:
- # selfsign CA doesn't do revocation
+ # some CA's might not implement revoke
pass
return dn