Bug 688423

Summary: Pluggable ECC in NSS not enabled on RHEL 6 and above
Product: Red Hat Enterprise Linux 6 Reporter: Elio Maldonado Batiz <emaldona>
Component: nssAssignee: Elio Maldonado Batiz <emaldona>
Status: CLOSED ERRATA QA Contact: Aleš Mareček <amarecek>
Severity: high Docs Contact:
Priority: medium    
Version: 6.1CC: amarecek, cfu, rrelyea
Target Milestone: rc   
Target Release: 6.2   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: nss-3.12.9-10.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 712556 1057224 (view as bug list) Environment:
Last Closed: 2011-12-06 12:08:34 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: 712556, 1057224    
Attachments:
Description Flags
set and export variables to allow pluggable ECC
rrelyea: review-
spec file changes to restore support for pluggable ecc
rrelyea: review-
support pluggable ecc
none
keep just phase 1 plus phase 2 as requested none

Description Elio Maldonado Batiz 2011-03-17 00:36:32 UTC
Created attachment 485873 [details]
set and export variables to allow pluggable ECC

Description of problem:
Need to allow pluggable ECC on RHEL 6 as it has been on RHEL 5 and 4.
Must set NSS_ENABLE_ECC and NSS_ECC_MORE_THAN_SUITE to 1 and exported them in nss.spec file for pluggable ECC support to be compiled in.

Version-Release number of selected component (if applicable): nss-3.12.9-5.el6

How reproducible: nss.spec inspection and comparison with the one for RHEL 5

Steps to Reproduce:
  
Actual results:
Section that sets and exports NSS_ENABLE_ECC and NSS_ECC_MORE_THAN_SUITE_B is missing

Expected results:
# Allow pluggable ECC
NSS_ENABLE_ECC=1
export NSS_ENABLE_ECC

export NSS_ECC_MORE_THAN_SUITE_B

Additional info:

Comment 2 Elio Maldonado Batiz 2011-03-17 01:04:21 UTC
(In reply to comment #0) 
This are not sufficient, nss won't compile with this small change. Even though  softoken was split-off as a separate package the split is not fully complete and we still carry the softoken sources around when building nss. This causes problems for ecc enabling. Some unwanted dependencies among the pieces of nss must be removed first. In addition to changes to the nss.spec file some patches to the actual code would be required.

Comment 3 RHEL Program Management 2011-04-04 02:00:36 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 8 Elio Maldonado Batiz 2011-06-09 19:25:53 UTC
Doing a a build without softoken sources on the tree as asked for in 689919 is a worthy long-tern goal. It will be complex as it may need several patches to deal with unwelcome dependencies of that higher levels of nss, libraries as well as test applications, have on headers which are currently private. Its is not strictly required to support pluggable ecc. We can continue to build woth entire sources as long as we do with in a manner which is consistent with the way we built the softoken and freebl sources for the nss-softoken packages. The same sources and patches should be used. I was able to do a full build with all test suites enabled.

Comment 9 Elio Maldonado Batiz 2011-06-10 05:24:56 UTC
(In reply to comment #2)
> (In reply to comment #0) 
> This are not sufficient, nss won't compile with this small change. Even though 

To elaborate, the export NSS_ENABLE_ECC resulted in the error
ecdecode.c:153:19: error: 'ecCurve_map' undeclared (first use in this function)

That is because we are compiling freebl sources that not support ecc.
We need to compile the freebl with NSS_ENABLE_ECC unset and the rest
of nss with NSS_ENABLE_ECC=1 plus the NSS_ECC_MORE_THAN_SUITE_B part.

The following change:
+##### phase 1: build freebl/softokn shared libraries
+unset NSS_ENABLE_ECC
+# Compile softoken plus needed support
+%{__make} -C ./mozilla/security/coreconf
+%{__make} -C ./mozilla/security/dbm
+%{__make} -C ./mozilla/security/nss
+
+##### phase 2: build the rest of nss
+# supporting pluggable ecc
+NSS_ENABLE_ECC=1
+export NSS_ENABLE_ECC
+NSS_ECC_MORE_THAN_SUITE_B=1
+export NSS_ECC_MORE_THAN_SUITE_B
+
fixes the compile error and the build completes.

But this isn't good enough. For consistency sake at least we should also apply any patches we apply when build nss-softokn. Now, we anticipate at times updating nss but keeping softoken at a previous version, such as one that was FIPS validated, and we should provide for this - notice the separate %global nss_softokn-version we keep around since the split of nss and nss-softokn. We should use the nss-softoken source tar ball for this. It will take just a few more lines.

Comment 10 Elio Maldonado Batiz 2011-06-10 05:50:40 UTC
Created attachment 504016 [details]
spec file changes to restore support for pluggable ecc

Comment 11 Bob Relyea 2011-06-10 21:38:39 UTC
Comment on attachment 485873 [details]
set and export variables to allow pluggable ECC

This is the patch you should check in....

Comment 12 Bob Relyea 2011-06-10 21:39:05 UTC
Comment on attachment 485873 [details]
set and export variables to allow pluggable ECC

r+

Comment 13 Bob Relyea 2011-06-10 21:40:32 UTC
Comment on attachment 504016 [details]
spec file changes to restore support for pluggable ecc

r- Don't do this. We eventually should expunge even building softoken, please don't complicated this task by trying to replicated nss-softokn.spec.

Comment 14 Bob Relyea 2011-06-10 21:43:58 UTC
Comment on attachment 485873 [details]
set and export variables to allow pluggable ECC

This isn't sufficient. You need Phase1 and Phase2 from the other patch.

Comment 15 Elio Maldonado Batiz 2011-06-10 21:58:38 UTC
Created attachment 504211 [details]
support pluggable ecc

Let's keep it to just what's needed.

Comment 16 Elio Maldonado Batiz 2011-06-10 23:53:43 UTC
Created attachment 504221 [details]
keep just phase 1 plus phase 2 as requested

Comment 19 errata-xmlrpc 2011-12-06 12:08:34 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-1584.html