summaryrefslogtreecommitdiffstats
path: root/ipaserver/plugins/dogtag.py
diff options
context:
space:
mode:
authorFraser Tweedale <ftweedal@redhat.com>2016-05-10 13:56:40 +1000
committerJan Cholasta <jcholast@redhat.com>2016-06-15 07:13:38 +0200
commit08e0aa23b0d2c7226472670b4d29d3cc5c5242d6 (patch)
tree7a184c97bd78d5703120df5e35cca3bcebe1b0cb /ipaserver/plugins/dogtag.py
parentae6d5b79fbce83e5ded8d8d46108b193c164ac14 (diff)
downloadfreeipa-08e0aa23b0d2c7226472670b4d29d3cc5c5242d6.tar.gz
freeipa-08e0aa23b0d2c7226472670b4d29d3cc5c5242d6.tar.xz
freeipa-08e0aa23b0d2c7226472670b4d29d3cc5c5242d6.zip
Add issuer options to cert-show and cert-find
Add options to cert-show and cert-find for specifying the issuer as a DN, or a CA name. Also add the issuer DN to the output of cert-find. Part of: https://fedorahosted.org/freeipa/ticket/4559 Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Diffstat (limited to 'ipaserver/plugins/dogtag.py')
-rw-r--r--ipaserver/plugins/dogtag.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/ipaserver/plugins/dogtag.py b/ipaserver/plugins/dogtag.py
index 43aab92ff..919ecfeac 100644
--- a/ipaserver/plugins/dogtag.py
+++ b/ipaserver/plugins/dogtag.py
@@ -1809,6 +1809,10 @@ class ra(rabase.rabase):
node.text = options['subject']
booloptions['subjectInUse'] = True
+ if 'issuer' in options:
+ node = etree.SubElement(page, 'issuerDN')
+ node.text = options['issuer']
+
if 'revocation_reason' in options:
node = etree.SubElement(page, 'revocationReason')
node.text = unicode(options['revocation_reason'])
@@ -1897,6 +1901,11 @@ class ra(rabase.rabase):
dn = cert.xpath('SubjectDN')
if len(dn) == 1:
response_request['subject'] = unicode(dn[0].text)
+
+ issuer_dn = cert.xpath('IssuerDN')
+ if len(dn) == 1:
+ response_request['issuer'] = unicode(issuer_dn[0].text)
+
status = cert.xpath('Status')
if len(status) == 1:
response_request['status'] = unicode(status[0].text)