You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



Build Instructions for NSS Using BSAFE

Newsgroup: mozilla.dev.tech.crypto
Main technical contact: Ian McGreer
Manager: Wan-Teh Chang

The NSS crypto libraries can be built using RSA's BSAFE Crypto-C Library to provide low-level crypto functionality. The glue code between NSS and BSAFE is in the file mozilla/security/nss/lib/freebl/blapi_bsf.c.

The instructions that follow describe preliminary steps you need to take to build the NSS libraries with the BSAFE library. BSAFE Crypto-C versions 4.1 and 5.0 have been tested on the RSA-supported platforms.

Once you have completed the instructions provided here, you can continue with the instructions at Build Instructions for NSS 3.1.

Important: The MOZILLA_CLIENT variable should not be set when you are attempting to build NSS with BSAFE.

Note on linking procedure: When you are using the RSA BSAFE library, there is a circular dependency between the freebl libraryand BSAFE so that you need to link with the freebl library before and after the BSAFE library.


Preliminary Unix Build Instructions for BSAFE

To build NSS and the necessary components from Mozilla on Unix/Linux using RSA's BSAFE Crypto-C Library, follow these steps:

  1. setenv MOZILLA_BSAFE_BUILD=1

  2. setenv BSAFEPATH= <path to your libbsafe.a, for example /usr/lib/libbsafe.a>

  3. Copy the BSAFE header files to mozilla/security/nss/lib/freebl.

  4. Follow the instructions at Unix Build Instructions for NSS 3.1.


Preliminary Windows Build Instructions for BSAFE

To build NSS and the necessary components from Mozilla on Windows using RSA's BSAFE Crypto-C Library, follow these steps:
  1. setenv MOZILLA_BSAFE_BUILD=1

  2. setenv BSAFEPATH= <path to your bsafe.lib, for example c:\Program Files\RSA\lib\msvc6\bsafe50.lib>

  3. setenv BSAFEVER= <the BSAFE version number that is appended to the bsafe library name: 41 for BSAFE 4.1 and 50 for BSAFE 5.0>>

  4. copy the BSAFE header files to mozilla/security/nss/lib/freebl.

  5. Follow the instructions at Windows Build Instructions for NSS 3.1.
Note: To use BSAFE 5.0 on Windows, you should add the following line to the freebl/manifest.mn file:
    DEFINES += -DRSA_PLATFORM=RSA_I386_486