Closed Bug 682885 Opened 14 years ago Closed 14 years ago

Move EC point compression options macros to a public header

Categories

(NSS :: Libraries, defect)

3.12.10
x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
3.13.2

People

(Reporter: elio.maldonado.batiz, Assigned: elio.maldonado.batiz)

References

Details

Attachments

(1 file, 2 obsolete files)

ec.h should be a public export. It contains #defines for elliptic curves compression methods and an OID and doesn't expose any private information of freebl. For Fedora and RHEL 6 where nss is split into three rpms's, util, softoken, and nss (the rest of nss) and thus build and package them separately, it will faciliate building nss without the softoken and util present in the source tree.
Attached patch makes ec.h a public export (obsolete) — Splinter Review
Assignee: nobody → emaldona
Attachment #556599 - Flags: review?(rrelyea)
Attachment #556599 - Attachment description: makes ec.h a punlic export → makes ec.h a public export
Based on code inspection, I think only the following macros defined in ec.h should be exported because they are used by code in lib/pk11wrap and lib/ssl: 43 #define EC_POINT_FORM_COMPRESSED_Y0 0x02 44 #define EC_POINT_FORM_COMPRESSED_Y1 0x03 45 #define EC_POINT_FORM_UNCOMPRESSED 0x04 46 #define EC_POINT_FORM_HYBRID_Y0 0x06 47 #define EC_POINT_FORM_HYBRID_Y1 0x0 Note: only EC_POINT_FORM_UNCOMPRESSED is used, but these five macros are a group and should stay together. The other macros are only used by lib/freebl and lib/softoken, so they should stay in an internal header of the softoken package.
One way to solve the problem is to simply move those five EC_POINT_FORM_xxx macros to blapit.h, which is an exported header.
Attachment #556599 - Attachment is obsolete: true
Attachment #556599 - Flags: review?(rrelyea)
Attachment #558092 - Flags: review?(wtc)
Summary: The ec.h header should be a public export → Move EC point compression options macros to a public heder
Comment on attachment 558092 [details] [diff] [review] Move EC point compression macros to a public header r=wtc. Would be nice to get Bob'd approval of this solution. I wonder if we should add a NSS_ prefix to these macros. We don't do that for many macros defined in blapit.h though. >+/* EC point compression options */ Nit: change "compression" to "format".
Attachment #558092 - Flags: superreview?
Attachment #558092 - Flags: review?(wtc)
Attachment #558092 - Flags: review+
Comment on attachment 558092 [details] [diff] [review] Move EC point compression macros to a public header Bob, could you review this patch?
Attachment #558092 - Flags: superreview? → superreview?(rrelyea)
Comment on attachment 558092 [details] [diff] [review] Move EC point compression macros to a public header r+
Attachment #558092 - Flags: superreview?(rrelyea) → superreview+
Summary: Move EC point compression options macros to a public heder → Move EC point compression options macros to a public header
With the move we need for pk11wrap/pk11akey.c to #include blapit.h instead of ec.h. And while I'm ate it. change "compression" to "format" in the comment as Wan-Teh had requested.
Attached patch complete patchSplinter Review
Attachment #558092 - Attachment is obsolete: true
Attachment #586490 - Flags: review?(rrelyea)
Comment on attachment 586490 [details] [diff] [review] complete patch r+ rrelyea
Attachment #586490 - Flags: review?(rrelyea) → review+
Checked in to trunk: /security/nss/lib/freebl/ec.h ./mozilla/security/nss/lib/pk11wrap/pk11akey.c Checking in ./mozilla/security/nss/lib/freebl/blapit.h; /cvsroot/mozilla/security/nss/lib/freebl/blapit.h,v <-- blapit.h new revision: 1.25; previous revision: 1.24 done Checking in ./mozilla/security/nss/lib/freebl/ec.h; /cvsroot/mozilla/security/nss/lib/freebl/ec.h,v <-- ec.h new revision: 1.3; previous revision: 1.2 done Checking in ./mozilla/security/nss/lib/pk11wrap/pk11akey.c; /cvsroot/mozilla/security/nss/lib/pk11wrap/pk11akey.c,v <-- pk11akey.c new revision: 1.35; previous revision: 1.34
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.13.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: