[EMAIL PROTECTED]">Revised build instructions for NSS 3.2 are enclosed. These have been tested to some extent internally. We will post them to mozilla.org when it's clear that they work reliably for other people too.
Please direct any questions or comments to the newsgroup.
- Sean
Build Instructions for NSS 3.2 Release
Newsgroup: netscape.public.mozilla.crypto
Main technical contact: Ian McGreer
Manager: Wan-Teh ChangThe instructions that follow describe how to build the standalone NSS libraries without the BSAFE library. These instructions have been tested on Unix and Windows. They will be updated as testing proceeds on other platforms.
For detailed information about the NSS 3.2 release, see NSS 3.2 Release Notes.
To build NSS with the RSA BSAFE Crypto-C library, first follow the instructions at Build Instructions for NSS Using RSA BSAFE Crypto-C, then continue with the instructions on this page.
Important: Before you build NSS, you should be familiar with the Mozilla CVS system; see source code via CVS for details.
Perl Version:You must be using Perl 5.004 or greater for the instructions given here to work correctly.
NSPR Version: NSS 3.2 is compatible with NSPR 4.0.1 or higher. We recommend using NSPR 4.1, as shown in the build instructions below. However, it's possible to use other NSPR tags, such as NSPRPUB_RELEASE_4_0_1 or NSPRPUB_CLIENT_BRANCH.
Notes on New Build Instructions
Build Instructions for All Platforms
Basic TestsNotes on New Build Instructions
It is now possible to build all of NSS (including NSPR and DBM) entirely with coreconf; that is, without using the mozilla browser's make system.It is no longer necessary to check out mozilla/config, mozilla/client.mk, or any other parts of the browser to build NSS and its dependencies.
It is no longer necessary to define any MOZ_* environment variables.
On Windows, it is not necessary to use nmake or cygwin or MKS tools to build NSS, NSPR, or DBM. Netscape's wintools gmake is sufficient for all these. NT's command prompt works OK too, provided you use backslashes instead of slashes in the appropriate places in the steps below.
NSS now builds with the GNU C compiler (gcc) (v 2.95.2) on Solaris.
Note re DBM: Using the instructions given here to build NSS 3.2 will not produce identical files to those released in ftp://ftp.mozilla.org/pub/security/nss/releases/NSS_3_2_RTM/. This is because the new instructions use mozilla's version of DBM, and the released binaries use Netscape's private version of DBM. The two versions of DBM are compatible.
Build Instructions for All Platforms
The following new build instructions should work for all platforms (with some platform-specific changes as noted).Before you begin: for Windows, if you haven't before, get Netscape's "wintools" as explained in 2.1 Requirements.
- Set environment variables:
- For Windows, set OS_TARGET to be either WINNT or WIN95 in the environment
- For Windows, make your PATH include the directory that contains Netscape's wintools (special gmake, shmsdos, etc.)
- If you want a non-debug optimized build, set BUILD_OPT=1 in your environment. Otherwise, you get a debug build. On Windows, if you want a debug build with the system's debug RTL libraries, set USE_DEBUG_RTL=1 in your environment.
- On Unix platforms, except Alpha/OSF1, if you want a build for the system's 64-bit ABI, set USE_64=1 in your environment. By default, NSS builds for the 32-bit environment on all platforms except Alpha/OSF1.
- Set the environment variable CVSROOT to :pserver:[EMAIL PROTECTED]:/cvsroot
- To build with gcc on platforms other than Linux and Windows, you need to set two more environment variables:
NSS_USE_GCC=1
NO_MDUPDATE=1- For windows, make sure the environment variable HOME is set to the name of a writable directory, and does not end with a slash or backslash, e.g. c:/home
- cvs login (if you haven't before).
- Do the following CVS checkouts. Note: CVS always takes forward slashes, even on Windows.
cvs co -r NSPRPUB_RELEASE_4_1 mozilla/nsprpub
cvs co -r NSS_3_2_BASE mozilla/dbm mozilla/security/coreconf
cvs co -r NSS_3_2_BASE mozilla/security/nss mozilla/security/dbm- Build NSPR, DBM, and NSS:
cd mozilla/security/nss (or, on Windows, cd mozilla\security\nss)
gmake nss_build_allBasic Tests
Once you have successfully built NSS, follow these steps to test the core functionality of the certutil tool and the setup and use of a basic SSL connection:For instructions on running more extensive NSS tests, see NSS Test Suite.
- Build NSS as described above and make sure that mozilla/dist/$(OBJDIR)/lib is in your shared library search path, which is specified by the LD_LIBRARY_PATH environment variable on most Unix platforms, by SHLIB_PATH on HP-UX, by LIBPATH on AIX, and by PATH on Windows.
- cd mozilla/security/nss/cmd/SSLsample
- gmake
- To create an SSL server certificate, you will need to include the host and domain names of the host you want to run the server on. For example, if your machine name is myhost.domain.com, you would set the two variables as follows:
setenv HOSTNAME myhost (on UNIX this is most likely set already)
setenv MYDOMAIN domain.com
These variables must be set correctly for your SSL server to work.- sh gencerts
gencerts is a shell script that will generate a CA certificate, an SSL server certificate, and an SSL client certificate.- You are now ready to run the sample SSL server. This is a sample command line:
server -n SampleSSLServerCert -p 8080 -d SampleCertDBs -w sample -c e -R- You can now connect to the server with client processes. This is a sample command line:
client -n SampleSSLClientCert -p 8080 -d SampleCertDBs -w sample -c 2 myhost.domain.com
buildnss_32.html
Content-Type:text/html Content-Encoding:7bit
Sean Cotter wrote:
- Re: Please help test new NSS 3.2 build instructio... Sean Cotter
- Re: Please help test new NSS 3.2 build instr... Robert Relyea
- Re: Please help test new NSS 3.2 build instr... Nelson Bolyard (At Home)
