Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 698772

Summary: RFE: add option to "ipa-getcert list" to list status for a single cert
Product: Red Hat Enterprise Linux 6 Reporter: Yi Zhang <yzhang>
Component: certmongerAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED ERRATA QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.1CC: dpal, jgalipea, jkodak, kchamart, ksiddiqu, nalin
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: certmonger-0.45-1.el6 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 17:37:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 703208    

Description Yi Zhang 2011-04-21 18:01:37 UTC
Description of problem:

per Dimitri's request: this would be a useful feature

>>> Yi To Nalin:
>>> >>> ipa-getcert list will return all cert status, are there any way to
>>> >>> get just one cert's status? I don't see an command line option to do
>>> >>> so
>> >> Nalin to Yi:There is none at this time.
>> >>
>> >> Nalin
> > Thanks for your information. It would be nice to have one.
> >
> > Yi
> >
> >
> >
Please open an RFE (Dimitri)



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 3 Kaleem 2011-10-07 07:24:36 UTC
Verified.

RHEL Version:
=============
[root@dhcp201-220 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.2 Beta (Santiago)

Certmonger Version:
==================
[root@dhcp201-220 ~]# rpm -q certmonger 
certmonger-0.48-1.el6.x86_64
[root@dhcp201-220 ~]#

Steps used to verify:
=====================
(1)Install certmonger 
[root@dhcp201-220 ~]# yum install certmonger -y
Loaded plugins: product-id, subscription-manager
.
.
.
Installed products updated.

Installed:
  certmonger.x86_64 0:0.48-1.el6                                                                    
[root@dhcp201-220 ~]

(2)start certmonger service

[root@dhcp201-220 ~]# service certmonger start
Starting certmonger:                                       [  OK  ]
[root@dhcp201-220 ~]#

(3)Generate a certificate (NSS db or File based storage)
   
   [root@dhcp201-220 ~]# mkdir /tmp/cert
   [root@dhcp201-220 ~]# chcon -t cert_t /tmp/cert/
   [root@dhcp201-220 ~]
 
  (a)NSS Db

    [root@dhcp201-220 ~]# getcert request -d /tmp/cert/ -n test -c SelfSign
New signing request "20111007073647" added.
[root@dhcp201-220 ~]#

  (b)file based storage

   [root@dhcp201-220 ~]# getcert request -k /tmp/cert/test.key -f /tmp/cert/test.pem -c SelfSign
New signing request "20111007074011" added.
[root@dhcp201-220 ~]#


(4)Now , list the certificate genereated in last step using 'getcert list" with anyone of the following

  (a)NSS db and nickname 

root@dhcp201-220 ~]# getcert list -d /tmp/cert/ -n test
Number of certificates and requests being tracked: 1.
Request ID '20111007073647':
	status: MONITORING
	stuck: no
	key pair storage: type=NSSDB,location='/tmp/cert',nickname='test',token='NSS Certificate DB'
	certificate: type=NSSDB,location='/tmp/cert',nickname='test',token='NSS Certificate DB'
	CA: SelfSign
	issuer: CN=dhcp201-220.englab.pnq.redhat.com
	subject: CN=dhcp201-220.englab.pnq.redhat.com
	expires: 2012-10-07 07:36:47 UTC
	dns: dhcp201-220.englab.pnq.redhat.com
	principal name: host/dhcp201-220.englab.pnq.redhat.com
	eku: id-kp-serverAuth
	track: yes
	auto-renew: yes
[root@dhcp201-220 ~]#

  (b)file based storage 

  [root@dhcp201-220 ~]# getcert list -f /tmp/cert/test.pem
Number of certificates and requests being tracked: 1.
Request ID '20111007074011':
	status: MONITORING
	stuck: no
	key pair storage: type=FILE,location='/tmp/cert/test.key'
	certificate: type=FILE,location='/tmp/cert/test.pem'
	CA: SelfSign
	issuer: CN=dhcp201-220.englab.pnq.redhat.com
	subject: CN=dhcp201-220.englab.pnq.redhat.com
	expires: 2012-10-07 07:40:11 UTC
	dns: dhcp201-220.englab.pnq.redhat.com
	principal name: host/dhcp201-220.englab.pnq.redhat.com
	eku: id-kp-serverAuth
	track: yes
	auto-renew: yes
[root@dhcp201-220 ~]#
   
  (c)request identifier

    [root@dhcp201-220 ~]# getcert list -i 20111007073647
Number of certificates and requests being tracked: 1.
Request ID '20111007073647':
	status: MONITORING
	stuck: no
	key pair storage: type=NSSDB,location='/tmp/cert',nickname='test',token='NSS Certificate DB'
	certificate: type=NSSDB,location='/tmp/cert',nickname='test',token='NSS Certificate DB'
	CA: SelfSign
	issuer: CN=dhcp201-220.englab.pnq.redhat.com
	subject: CN=dhcp201-220.englab.pnq.redhat.com
	expires: 2012-10-07 07:36:47 UTC
	dns: dhcp201-220.englab.pnq.redhat.com
	principal name: host/dhcp201-220.englab.pnq.redhat.com
	eku: id-kp-serverAuth
	track: yes
	auto-renew: yes
[root@dhcp201-220 ~]#

Result:
Now, only one certificate is displayed using 'getcet list' with anyone of NSS db, Filebased storage or request identifier.

Comment 4 errata-xmlrpc 2011-12-06 17:37:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1708.html