Last Comment Bug 177387 - Implement software integrity check of the softoken using DSA
: Implement software integrity check of the softoken using DSA
Status: RESOLVED FIXED
:
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: 3.2.2
: All All
: P1 enhancement (vote)
: 3.8
Assigned To: Robert Relyea
: Bishakha Banerjee
:
Mentors:
Depends on: 189332
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-29 15:42 PST by Wan-Teh Chang
Modified: 2003-02-12 15:39 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Add freebl_GetLibraryFilePathname to libfreebl.a temporarily (10.00 KB, patch)
2003-01-29 22:37 PST, Wan-Teh Chang
no flags Details | Diff | Splinter Review
Add freebl_GetLibraryFilePathname to libfreebl.a temporarily, v2 (10.01 KB, patch)
2003-01-29 22:56 PST, Wan-Teh Chang
no flags Details | Diff | Splinter Review
Include the *.chk files in mdbinary.jar (1.23 KB, patch)
2003-02-05 19:54 PST, Wan-Teh Chang
no flags Details | Diff | Splinter Review
Include the *.chk files in mdbinary.jar, v2 (3.01 KB, patch)
2003-02-06 09:04 PST, Wan-Teh Chang
no flags Details | Diff | Splinter Review

Description Wan-Teh Chang 2002-10-29 15:42:12 PST
We need to implement a software integrity check of
the softoken using DSA.

Here is my proposal.

1. Write a tool that generates a DSA key pair and
generates a signature.

2. During the build, we invoke the tool on the
softoken after it is built.  Store the public key
and the signature in a file.  Discard the private
key.

3. Distribute the public key/signature file with
the softoken.  The public key/signature file must
be installed in the same directory as the softoken.

4. The software integrity check of the softoken
uses platform-dependent techniques to discover its
installation directory.  It then reads itself (as
a file) and the public key/signature file to verify
the signature.
Comment 1 Wan-Teh Chang 2002-12-06 11:11:47 PST
Moved to target milestone 3.8 because the original
NSS 3.7 release has been renamed 3.8.
Comment 2 Wan-Teh Chang 2003-01-29 22:37:42 PST
Created attachment 113076 [details] [diff] [review]
Add freebl_GetLibraryFilePathname to libfreebl.a temporarily

This patch adds freebl_GetLibraryFilePathname to libfreebl.a
temporarily.  The new function is defined in the new file
mozilla/security/nss/lib/freebl/libpath.c and has the same
semantics as the NSPR 4.3 function PR_GetLibraryFilePathname.
This patch should be backed out when NSPR 4.3 is released.
Comment 3 Wan-Teh Chang 2003-01-29 22:56:24 PST
Created attachment 113078 [details] [diff] [review]
Add freebl_GetLibraryFilePathname to libfreebl.a temporarily, v2

Use __LP64__ instead of __LP64 on HP-UX.
Comment 4 Wan-Teh Chang 2003-02-05 19:54:34 PST
Created attachment 113658 [details] [diff] [review]
Include the *.chk files in mdbinary.jar

The *.chk files need to be included in our binary distributions.
Comment 5 Wan-Teh Chang 2003-02-05 21:31:33 PST
I got this error once:

./Linux2.4_x86_glibc_PTH_DBG.OBJ/shlibsign -v -i ../../../../dist/Linux2.4_x86_g
libc_PTH_DBG.OBJ/lib/libsoftokn3.so
Generating DSA Key Pair....Generating PQG Params: An I/O error occurred during s
ecurity authorization.
Comment 6 Wan-Teh Chang 2003-02-06 09:04:43 PST
Created attachment 113696 [details] [diff] [review]
Include the *.chk files in mdbinary.jar, v2

The previous patch doesn't work if mozilla/dist/$(OBJDIR)/lib/*.chk
are not symbolic links.

The changes to cmd/shlibsign/Makefile are good changes in general
because they put all the configuration/assignments before the
rules, which is the right order.  The change to
cmd/shlibsign/manifest.mn is what causes the *.chk files to be
included in mdbinary.jar.  It requires that CHECKLOC be defined
before coreconf/rules.mk is included in Makefile, which is why
I put the configuration/assignments and rules in the right order.
Comment 7 Robert Relyea 2003-02-12 15:39:32 PST
Code is checked in and Running

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