mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Return an error message when revocation reason 7 is used
7 is undefined as a revocation reason. https://fedorahosted.org/freeipa/ticket/1318
This commit is contained in:
committed by
Martin Kosek
parent
ae775ec169
commit
cbc5df4536
@@ -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)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user