NSS-3.12.4

Introduction to NSS

The Network Security Services (NSS) package is a set of libraries designed to support cross-platform development of security-enabled client and server applications. Applications built with NSS can support SSL v2 and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and other security standards. This is useful for implementing SSL and S/MIME or other Internet security standards into an application.

Package Information

Additional Downloads

NSS Dependencies

Required

NSPR-4.8.2

Recommended

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/nss

Installation of NSS

Install NSS by running the following commands:

bash

export BUILD_OPT=1 &&
export NSS_USE_SYSTEM_SQLITE=1 &&
export NSPR_INCLUDE_DIR=/usr/include/nspr &&
export USE_SYSTEM_ZLIB=1 &&
export ZLIB_LIBS=-lz &&
patch -Np1 -i ../nss-3.12.4-standalone-3.patch &&
make -C mozilla/security/nss nss_build_all

To test the results, you'll need to set the domain name of your system in the DOMSUF environment variable. Most of the tests will fail if you don't provide the correct domain name. A self-generated log file will be parsed at the end of the test to display how many tests passed. It should return 800. To run the tests, ensure you change the export DOMSUF command below to an appropriate value, e.g., mydomain.com and issue the following commands:

bash

export DOMSUF=<validdomain.name> &&
export PATH=$PATH:$PWD/mozilla/dist/$NSS_LINUXDIR/bin &&
export TEST_RESULTSDIR=$PWD/mozilla/tests_results/security &&

cd mozilla/security/nss/tests &&
sed -i 's/gmake/make/' common/init.sh &&
./all.sh &&

grep Passed $TEST_RESULTSDIR/$(hostname).1/results.html | wc -l &&

exit

Now, as the root user:

export NSS_LINUXDIR=$(basename `ls -d $PWD/mozilla/dist/Linux*`) &&
cd mozilla/dist &&
install -v -m755 $NSS_LINUXDIR/lib/*.so /usr/lib &&
install -v -m644 $NSS_LINUXDIR/lib/{*.chk,libcrmf.a} /usr/lib &&
install -v -m755 -d /usr/include/nss &&
install -v -m755 $NSS_LINUXDIR/bin/nss-config /usr/bin &&
install -v -m644 $NSS_LINUXDIR/lib/pkgconfig/nss.pc /usr/lib/pkgconfig &&
cp -v -RL {public,private}/nss/* /usr/include/nss &&
chmod 644 /usr/include/nss/*

Now as the unprivileged user, exit the bash shell started at the beginning of the installation to restore the environment to the original state.

exit

Command Explanations

bash: Shells are started as many environment variables are created during the installation process. Exiting the shells serves the purpose of restoring the environment and returning back to the original directory when the installation is complete.

export BUILD_OPT=1: This variable is set so that the build is performed with no debugging symbols built into the binaries and that the default compiler optimizations are used.

export NSPR_INCLUDE_DIR=/usr/include/nspr: This command sets the location of the nspr headers.

export USE_SYSTEM_*: These commands ensure that the system installed libraries are used instead of the in-tree versions.

export ZLIB_LIBS=-lz: This command provides the needed linker flags to link to the system zlib.

export NSS_LINUXDIR=...: This variable is set so that the exact name of the architecture specific directories where the binaries are stored in the source tree can be determined.

make -C mozilla/security/nss nss_build_all: This command builds the NSS libraries and creates a dist directory which houses all the programs, libraries and interface headers. None of the programs created by this process are installed onto the system using the default instructions (except for nss-config). If you need any of these programs installed, you can find them in the mozilla/*.OBJ/dist/bin directory of the source tree.

sed -i 's/gmake/make/' common/init.sh: This command changes the command used to compile some test programs.

Contents

Installed Programs: nss-config
Installed Libraries: libcrmf.a, libfreebl3.so, libnss3.so, libnssckbi.so, libnssdbm3.so, libnssutil3.so, libsmime3.so, libsoftokn3.so and libssl3.so
Installed Directories: /usr/include/nss

Short Descriptions

nss-config

is used to determine the NSS library settings of the installed NSS libraries.

Last updated on 2009-10-06 19:24:55 +0000