Bug 698772 - RFE: add option to "ipa-getcert list" to list status for a single cert
Summary: RFE: add option to "ipa-getcert list" to list status for a single cert
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: certmonger
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Nalin Dahyabhai
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 703208
TreeView+ depends on / blocked
 
Reported: 2011-04-21 18:01 UTC by Yi Zhang
Modified: 2011-12-06 17:37 UTC (History)
6 users (show)

Fixed In Version: certmonger-0.45-1.el6
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 17:37:36 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1708 0 normal SHIPPED_LIVE certmonger bug fix update 2011-12-06 01:02:28 UTC

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


Note You need to log in before you can comment on or make changes to this bug.