summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/cert.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2011-06-14 22:03:02 -0400
committerMartin Kosek <mkosek@redhat.com>2011-06-15 16:42:29 +0200
commitcbc5df4536320843f3eed0dc54755bf21922e2c7 (patch)
tree9b4c650b9bbc456a4e8f700a54b8f6a9db73403a /ipalib/plugins/cert.py
parentae775ec169374c9de47e91c0d350a1d3e2518623 (diff)
downloadfreeipa-cbc5df4536320843f3eed0dc54755bf21922e2c7.tar.gz
freeipa-cbc5df4536320843f3eed0dc54755bf21922e2c7.tar.xz
freeipa-cbc5df4536320843f3eed0dc54755bf21922e2c7.zip
Return an error message when revocation reason 7 is used
7 is undefined as a revocation reason. https://fedorahosted.org/freeipa/ticket/1318
Diffstat (limited to 'ipalib/plugins/cert.py')
-rw-r--r--ipalib/plugins/cert.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipalib/plugins/cert.py b/ipalib/plugins/cert.py
index b219835d1..647a2e526 100644
--- a/ipalib/plugins/cert.py
+++ b/ipalib/plugins/cert.py
@@ -552,6 +552,8 @@ class cert_revoke(VirtualCommand):
result = api.Command['cert_show'](unicode(serial_number))['result']
except errors.NotImplementedError:
pass
+ if kw['revocation_reason'] == 7:
+ raise errors.CertificateOperationError(error=_('7 is not a valid revocation reason'))
return dict(
result=self.Backend.ra.revoke_certificate(serial_number, **kw)
)