From cbc5df4536320843f3eed0dc54755bf21922e2c7 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 14 Jun 2011 22:03:02 -0400 Subject: Return an error message when revocation reason 7 is used 7 is undefined as a revocation reason. https://fedorahosted.org/freeipa/ticket/1318 --- ipalib/plugins/cert.py | 2 ++ 1 file changed, 2 insertions(+) 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) ) -- cgit