Bug 733550

Summary: DRM failed to recovery keys when in FIPS mode (HSM + NSS)
Product: [Retired] Dogtag Certificate System Reporter: Matthew Harmsen <mharmsen>
Component: JSSAssignee: Christina Fu <cfu>
Status: CLOSED EOL QA Contact: Ben Levenson <benl>
Severity: high Docs Contact:
Priority: high    
Version: 9.0CC: alee, cfu, dpal, jmagne, mharmsen, rrelyea
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 730164 Environment:
Last Closed: 2020-03-27 18:39: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, 733551    
Bug Blocks:    

Description Matthew Harmsen 2011-08-26 01:02:01 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 2 Matthew Harmsen 2011-09-28 05:17:35 UTC
Removed "CC_Required" from Devel Whiteboard as this is a clone of the RHCS 8.1 patch for Dogtag.