URL: https://github.com/freeipa/freeipa/pull/176
Author: frasertweedale
 Title: #176: cert-show: show validity in default output
Action: opened

PR body:
"""
cert-show no longer shows validity dates without `--all', but this
is important information that should be shown by default.  Make it
so.

Fixes: https://fedorahosted.org/freeipa/ticket/6419
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/176/head:pr176
git checkout pr176
From 36e27043ef91b8e288c5ec7c4983fdb0b48e1b47 Mon Sep 17 00:00:00 2001
From: Fraser Tweedale <ftwee...@redhat.com>
Date: Fri, 21 Oct 2016 13:41:24 +1000
Subject: [PATCH] cert-show: show validity in default output

cert-show no longer shows validity dates without `--all', but this
is important information that should be shown by default.  Make it
so.

Fixes: https://fedorahosted.org/freeipa/ticket/6419
---
 ipaserver/plugins/cert.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipaserver/plugins/cert.py b/ipaserver/plugins/cert.py
index d13974e..a66cc38 100644
--- a/ipaserver/plugins/cert.py
+++ b/ipaserver/plugins/cert.py
@@ -399,9 +399,9 @@ def _parse(self, obj, full=True):
             obj['subject'] = DN(unicode(cert.subject))
             obj['issuer'] = DN(unicode(cert.issuer))
             obj['serial_number'] = cert.serial_number
+            obj['valid_not_before'] = unicode(cert.valid_not_before_str)
+            obj['valid_not_after'] = unicode(cert.valid_not_after_str)
             if full:
-                obj['valid_not_before'] = unicode(cert.valid_not_before_str)
-                obj['valid_not_after'] = unicode(cert.valid_not_after_str)
                 obj['md5_fingerprint'] = unicode(
                     nss.data_to_hex(nss.md5_digest(cert.der_data), 64)[0])
                 obj['sha1_fingerprint'] = unicode(
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to