From b84fcf96ec5f011836255a7c7de9b3c0f98cb2b3 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jcholast@redhat.com>
Date: Mon, 29 Aug 2016 17:49:56 +0200
Subject: [PATCH] cert: add missing param values to cert-find output

Add back `serial_number_hex` and `revoked` param values to cert-find output
accidentally removed in commit c718ef058847bb39e78236e8af0ad69ac961bbcf.

https://fedorahosted.org/freeipa/ticket/6269
---
 ipaserver/plugins/cert.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ipaserver/plugins/cert.py b/ipaserver/plugins/cert.py
index 1184f80..5267e38 100644
--- a/ipaserver/plugins/cert.py
+++ b/ipaserver/plugins/cert.py
@@ -1207,7 +1207,8 @@ def _ca_search(self, all, raw, pkey_only, sizelimit, exactly, **options):
                 obj = ra_obj
                 obj['issuer'] = issuer
                 obj['subject'] = DN(ra_obj['subject'])
-                del obj['serial_number_hex']
+                obj['revoked'] = (
+                    ra_obj['status'] in (u'REVOKED', u'REVOKED_EXPIRED'))
 
                 if all:
                     ra_obj = ra.get_certificate(str(serial_number))
