pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone
Blob Blame History Raw
From 7bad2b168b2abbfcd0d81afe7f52342648b75bc4 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

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
---
 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 6dd9f6ffcdcd9d051d50d912996fea2104d71dff..a1166a0d0e5b09586832550c055fc6714c3efe26 100644
--- a/ipaserver/plugins/cert.py
+++ b/ipaserver/plugins/cert.py
@@ -1083,7 +1083,8 @@ class cert_find(Search, CertMethod):
                 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))
-- 
2.7.4