Bug 733551

Summary: DRM failed to recovery keys when in FIPS mode (HSM + NSS)
Product: Red Hat Enterprise Linux 6 Reporter: Matthew Harmsen <mharmsen>
Component: jssAssignee: Matthew Harmsen <mharmsen>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: high Docs Contact:
Priority: high    
Version: 6.2CC: alee, awnuk, benl, cfu, dpal, jmagne, kchamart, ksiddiqu, mharmsen, rrelyea, shaines
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: jss-4.2.6-20.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 730164 Environment:
Last Closed: 2011-12-06 16:52:17 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: 730164    
Bug Blocks: 733550    

Description Matthew Harmsen 2011-08-26 01:05:14 UTC
+++ This bug was initially created as a clone of Bug #730164 +++

follow the instruction to set up CA and DRM in FIPS mode:
https://wiki.idm.lab.bos.redhat.com/export/idmwiki/Setting_up_in_FIPS_mode

Enroll a cert via Manual User Signing & Encryption Certificates Enrollment profile
Go to DRM agent page to click on List Requests and see the key archival has been completed.
Click on Recover Keys to recover the key
Grant
When retrieving p12, error will show: 
PKCS #12 Creation Failed org.mozilla.jss.crypto.TokenException: Failed to import PBA key from PBA-generated bits

--- Additional comment from cfu on 2011-08-15 20:05:48 EDT ---

Created attachment 518375 [details]
JSS fix for PKCS12 to allow working on FIPS token

--- Additional comment from cfu on 2011-08-15 20:19:22 EDT ---

Created attachment 518376 [details]
jss spec file for jss-PKCS12-FIPS.patch

--- Additional comment from jmagne on 2011-08-15 21:00:16 EDT ---

Comment on attachment 518375 [details]
JSS fix for PKCS12 to allow working on FIPS token

For the first patch, a couple of comments. 1) Are we supposed to initialize ivData to something????

2) You are referencing members of pointers pwitema nd salt. Might want to check for nulls.

--- Additional comment from cfu on 2011-08-16 11:48:02 EDT ---

(In reply to comment #3)
> Comment on attachment 518375 [details]
> JSS fix for PKCS12 to allow working on FIPS token
> 
> For the first patch, a couple of comments. 1) Are we supposed to initialize
> ivData to something????

I missed this question.  This is MAC for PKCS12.  If you set the IV wouldn't you need to pass it to the receiver as well?  I don't think our tools handle that.

> 
> 2) You are referencing members of pointers pwitema nd salt. Might want to check
> for nulls.

yes, I have added NULL check for both.

--- Additional comment from cfu on 2011-08-16 11:54:02 EDT ---

got this from kwright:

rpms:
> http://download.devel.redhat.com/brewroot/packages/jss/4.2.6/18.99.el5idm/x86_64/jss-4.2.6-18.99.el5idm.x86_64.rpm
> http://download.devel.redhat.com/brewroot/packages/jss/4.2.6/18.99.el5idm/x86_64/jss-debuginfo-4.2.6-18.99.el5idm.x86_64.rpm
> http://download.devel.redhat.com/brewroot/packages/jss/4.2.6/18.99.el5idm/x86_64/jss-javadoc-4.2.6-18.99.el5idm.x86_64.rpm
> 
CS 8.1 rc repos have been updated to pick up the latest jss build
https://wiki.idm.lab.bos.redhat.com/repos/cs/8.1/devel/RHEL5/rc/i386/
https://wiki.idm.lab.bos.redhat.com/repos/cs/8.1/devel/RHEL5/rc/x86_64

This bug needs to be cloned later for platforms other than RHEL5.

--- Additional comment from jmagne on 2011-08-16 12:40:15 EDT ---

Comment on attachment 518375 [details]
JSS fix for PKCS12 to allow working on FIPS token

Plussing based on cfu's simple feedback which should take care of the issue.

Comment 1 Matthew Harmsen 2011-08-26 01:08:19 UTC
This bug was created to keep the standalone JSS component in sync across all platforms.

Comment 3 Kaleem 2011-11-04 19:26:29 UTC
pki-kra component not available on RHEL 6.2.

QE will do only sanity checking for the bug.

Comment 5 errata-xmlrpc 2011-12-06 16:52:17 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-1675.html