NSS Upstream Development

From Dogtag
Revision as of 20:18, 6 June 2018 by Edewata (talk | contribs) (Prerequisites)

Jump to: navigation, search

Overview

NSS source code is stored Mercurial repository at https://hg.mozilla.org/projects/nss.

A Git mirror is available at https://github.com/nss-dev/nss.

Prerequisites

$ dnf install mercurial git-remote-hg
$ dnf install nss-softokn-devel nss-util-devel sqlite-devel xmlto
$ dnf install clang

Getting Source Code

Create a folder called 'sandbox':

$ mkdir sandbox
$ cd sandbox

To checkout NSPR source:

$ hg clone https://hg.mozilla.org/projects/nspr

or

$ git clone hg::https://hg.mozilla.org/projects/nspr

To checkout NSS source:

$ hg clone https://hg.mozilla.org/projects/nss

or

$ git clone hg::https://hg.mozilla.org/projects/nss

or

$ git clone https://github.com/nss-dev/nss.git

Formatting

$ clang-format -i <filenames...>

Debug Methods

SSL_TRC();
fprintf(stderr, message);

Building NSS

To create normal NSPR and NSS build, go to the 'nss' folder and execute the following:

$ USE_64=1 make nss_build_all

It will build the binaries in '../dist' folder.

To clean the system:

$ USE_64=1 make nss_clean_all

To run tests:

$ cd tests
$ ./all.sh

To run specific tests:

$ cd tests/ssl_gtests
$ ./ssl_gtests.sh

See also NSS Tests.

References