Bug 688423 - Pluggable ECC in NSS not enabled on RHEL 6 and above
Pluggable ECC in NSS not enabled on RHEL 6 and above
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nss (Show other bugs)
6.1
Unspecified Linux
medium Severity high
: rc
: 6.2
Assigned To: Elio Maldonado Batiz
Aleš Mareček
:
Depends On:
Blocks: 712556 1057224
  Show dependency treegraph
 
Reported: 2011-03-16 20:36 EDT by Elio Maldonado Batiz
Modified: 2014-01-23 11:29 EST (History)
3 users (show)

See Also:
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 07:08:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
set and export variables to allow pluggable ECC (1.31 KB, patch)
2011-03-16 20:36 EDT, Elio Maldonado Batiz
rrelyea: review-
Details | Diff
spec file changes to restore support for pluggable ecc (3.35 KB, text/plain)
2011-06-10 01:50 EDT, Elio Maldonado Batiz
rrelyea: review-
Details
support pluggable ecc (2.15 KB, patch)
2011-06-10 17:58 EDT, Elio Maldonado Batiz
no flags Details | Diff
keep just phase 1 plus phase 2 as requested (1.95 KB, text/plain)
2011-06-10 19:53 EDT, Elio Maldonado Batiz
no flags Details

  None (edit)
Description Elio Maldonado Batiz 2011-03-16 20:36:32 EDT
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-16 21:04:21 EDT
(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 Product and Program Management 2011-04-03 22:00:36 EDT
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 15:25:53 EDT
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 01:24:56 EDT
(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 01:50:40 EDT
Created attachment 504016 [details]
spec file changes to restore support for pluggable ecc
Comment 11 Bob Relyea 2011-06-10 17:38:39 EDT
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 17:39:05 EDT
Comment on attachment 485873 [details]
set and export variables to allow pluggable ECC

r+
Comment 13 Bob Relyea 2011-06-10 17:40:32 EDT
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 17:43:58 EDT
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 17:58:38 EDT
Created attachment 504211 [details]
support pluggable ecc

Let's keep it to just what's needed.
Comment 16 Elio Maldonado Batiz 2011-06-10 19:53:43 EDT
Created attachment 504221 [details]
keep just phase 1 plus phase 2 as requested
Comment 19 errata-xmlrpc 2011-12-06 07:08:34 EST
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

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