Build Instructions for NSS Using BSAFE
Newsgroup: mozilla.dev.tech.cryptoMain 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:
- setenv MOZILLA_BSAFE_BUILD=1
- setenv BSAFEPATH= <path to your libbsafe.a,
for example /usr/lib/libbsafe.a>
- Copy the BSAFE header files to mozilla/security/nss/lib/freebl.
- 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:- setenv MOZILLA_BSAFE_BUILD=1
- setenv BSAFEPATH= <path to your bsafe.lib,
for example c:\Program Files\RSA\lib\msvc6\bsafe50.lib>
- 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>>
- copy the BSAFE header files to mozilla/security/nss/lib/freebl.
- Follow the instructions at Windows Build Instructions for NSS 3.1.
-
DEFINES += -DRSA_PLATFORM=RSA_I386_486