mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 08:41:55 -06:00
cert: add revocation reason back to cert-find output
In commitc718ef0588
some param values were accidentally removed from cert-find output. In commit22d5f579bb
`serial_number_hex` and `revoked` were added back. Add back `revocation_reason` as well. Also, do not include `revoked` with --raw, as it's a virtual attribute. https://fedorahosted.org/freeipa/ticket/6269 Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
This commit is contained in:
parent
6c09d6f878
commit
16dad1c3cb
@ -1231,16 +1231,17 @@ class cert_find(Search, CertMethod):
|
||||
obj = {'serial_number': serial_number}
|
||||
else:
|
||||
obj = ra_obj
|
||||
obj['issuer'] = issuer
|
||||
obj['subject'] = DN(ra_obj['subject'])
|
||||
obj['revoked'] = (
|
||||
ra_obj['status'] in (u'REVOKED', u'REVOKED_EXPIRED'))
|
||||
|
||||
if all:
|
||||
ra_obj = ra.get_certificate(str(serial_number))
|
||||
if not raw:
|
||||
obj.update(ra.get_certificate(str(serial_number)))
|
||||
|
||||
if not raw:
|
||||
obj['issuer'] = issuer
|
||||
obj['subject'] = DN(ra_obj['subject'])
|
||||
obj['revoked'] = (
|
||||
ra_obj['status'] in (u'REVOKED', u'REVOKED_EXPIRED'))
|
||||
if all:
|
||||
obj['certificate'] = (
|
||||
ra_obj['certificate'].replace('\r\n', ''))
|
||||
obj['certificate'].replace('\r\n', ''))
|
||||
self.obj._parse(obj)
|
||||
|
||||
obj['cacn'] = ca_obj['cn'][0]
|
||||
|
Loading…
Reference in New Issue
Block a user