Sean Cotter wrote:
[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 Chang

The 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 Tests


Notes 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.

  1. Set environment variables:
    1. For Windows, set OS_TARGET to be either WINNT or WIN95 in the environment
    2. For Windows, make your PATH include the directory that contains Netscape's wintools (special gmake, shmsdos, etc.)
    3. 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.
    4. 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.
    5. Set the environment variable CVSROOT to :pserver:[EMAIL PROTECTED]:/cvsroot
    6. 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

    7. 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
  2. cvs login (if you haven't before).

  3. 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
  4. Build NSPR, DBM, and NSS:
      cd mozilla/security/nss (or, on Windows, cd mozilla\security\nss)
      gmake nss_build_all

Basic 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:


  
  1. 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.

  2. cd mozilla/security/nss/cmd/SSLsample

  3. gmake

  4. 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.

  5. sh gencerts
    gencerts
    is a shell script that will generate a CA certificate, an SSL server certificate, and an SSL client certificate.

  6. 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

  7. 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
For instructions on running more extensive NSS tests, see NSS Test Suite.
buildnss_32.html
Content-Type:
text/html
Content-Encoding:
7bit


Reply via email to