[30f88917] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[30f88917] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[09b524b] | 7 | <!-- for when .0 is not part of the new tarball name, but always referenced -->
|
---|
[23ed085] | 8 | <!ENTITY nss-url "archive.mozilla.org/pub/security/nss/releases">
|
---|
[299d5c54] | 9 |
|
---|
[6968e3cb] | 10 | <!-- micro versions-->
|
---|
[fe83f5c] | 11 | <!--<!ENTITY nss-download-http "https://&nss-url;/NSS_3_&nss-minor-version;_&nss-micro-version;_RTM/src/nss-&nss-version;.tar.gz">-->
|
---|
[02b153a] | 12 |
|
---|
[d445316] | 13 | <!-- no micro versions -->
|
---|
[fe83f5c] | 14 | <!ENTITY nss-download-http "https://&nss-url;/NSS_3_&nss-minor-version;_RTM/src/nss-&nss-version;.tar.gz">
|
---|
[4b65cdf] | 15 |
|
---|
[365c6fb] | 16 | <!ENTITY nss-download-ftp " ">
|
---|
[b4ca8bb] | 17 | <!ENTITY nss-md5sum "1a6ecb5ed5eb00c3c50eda15116b45fb">
|
---|
| 18 | <!ENTITY nss-size "81 MB">
|
---|
| 19 | <!ENTITY nss-buildsize "316 MB (add 159 MB for tests)">
|
---|
[fe83f5c] | 20 | <!ENTITY nss-time "1.9 SBU (with parallelism=4, add 18 SBU for tests)">
|
---|
[30f88917] | 21 | ]>
|
---|
| 22 |
|
---|
[b4ca8bb] | 23 | <sect1 id="nss" xreflabel="nss-&nss-version;">
|
---|
[30f88917] | 24 | <?dbhtml filename="nss.html"?>
|
---|
| 25 |
|
---|
| 26 | <sect1info>
|
---|
| 27 | <date>$Date$</date>
|
---|
| 28 | </sect1info>
|
---|
| 29 |
|
---|
| 30 | <title>NSS-&nss-version;</title>
|
---|
| 31 |
|
---|
| 32 | <indexterm zone="nss">
|
---|
| 33 | <primary sortas="a-NSS">NSS</primary>
|
---|
| 34 | </indexterm>
|
---|
| 35 |
|
---|
| 36 | <sect2 role="package">
|
---|
| 37 | <title>Introduction to NSS</title>
|
---|
| 38 |
|
---|
[9333a525] | 39 | <para>
|
---|
| 40 | The Network Security Services (<application>NSS</application>) package is
|
---|
| 41 | a set of libraries designed to support cross-platform development of
|
---|
| 42 | security-enabled client and server applications. Applications built with
|
---|
| 43 | NSS can support SSL v2 and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12,
|
---|
| 44 | S/MIME, X.509 v3 certificates, and other security standards. This is
|
---|
| 45 | useful for implementing SSL and S/MIME or other Internet security
|
---|
| 46 | standards into an application.
|
---|
| 47 | </para>
|
---|
[30f88917] | 48 |
|
---|
[d9622443] | 49 | &lfs111_checked;
|
---|
[e3060aa] | 50 |
|
---|
[30f88917] | 51 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 52 | <itemizedlist spacing="compact">
|
---|
| 53 | <listitem>
|
---|
[9333a525] | 54 | <para>
|
---|
| 55 | Download (HTTP): <ulink url="&nss-download-http;"/>
|
---|
| 56 | </para>
|
---|
[30f88917] | 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
[9333a525] | 59 | <para>
|
---|
| 60 | Download (FTP): <ulink url="&nss-download-ftp;"/>
|
---|
| 61 | </para>
|
---|
[30f88917] | 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
[9333a525] | 64 | <para>
|
---|
[0f62b2b] | 65 | Download MD5 sum: &nss-md5sum;
|
---|
| 66 | </para>
|
---|
[30f88917] | 67 | </listitem>
|
---|
| 68 | <listitem>
|
---|
[9333a525] | 69 | <para>
|
---|
| 70 | Download size: &nss-size;
|
---|
| 71 | </para>
|
---|
[30f88917] | 72 | </listitem>
|
---|
| 73 | <listitem>
|
---|
[9333a525] | 74 | <para>
|
---|
| 75 | Estimated disk space required: &nss-buildsize;
|
---|
| 76 | </para>
|
---|
[30f88917] | 77 | </listitem>
|
---|
| 78 | <listitem>
|
---|
[9333a525] | 79 | <para>
|
---|
| 80 | Estimated build time: &nss-time;
|
---|
| 81 | </para>
|
---|
[30f88917] | 82 | </listitem>
|
---|
| 83 | </itemizedlist>
|
---|
| 84 |
|
---|
[299d5c54] | 85 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 86 | <itemizedlist spacing="compact">
|
---|
| 87 | <listitem>
|
---|
| 88 | <para>
|
---|
| 89 | Required patch:
|
---|
[a41a3ea9] | 90 | <ulink url="&patch-root;/nss-&nss-version;-standalone-1.patch"/>
|
---|
[299d5c54] | 91 | </para>
|
---|
| 92 | </listitem>
|
---|
| 93 | </itemizedlist>
|
---|
| 94 |
|
---|
[dd44df7e] | 95 | <bridgehead renderas="sect3">NSS Dependencies</bridgehead>
|
---|
| 96 |
|
---|
| 97 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[9333a525] | 98 | <para role="required">
|
---|
| 99 | <xref linkend="nspr"/>
|
---|
| 100 | </para>
|
---|
[dd44df7e] | 101 |
|
---|
| 102 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[9333a525] | 103 | <para role="recommended">
|
---|
[96e9478] | 104 | <xref linkend="sqlite"/> and
|
---|
| 105 | <xref role="runtime" linkend="p11-kit"/> (runtime)
|
---|
[9333a525] | 106 | </para>
|
---|
[dd44df7e] | 107 |
|
---|
[9333a525] | 108 | <para condition="html" role="usernotes">
|
---|
| 109 | User Notes: <ulink url="&blfs-wiki;/nss"/>
|
---|
| 110 | </para>
|
---|
[30f88917] | 111 | </sect2>
|
---|
| 112 |
|
---|
| 113 | <sect2 role="installation">
|
---|
| 114 | <title>Installation of NSS</title>
|
---|
| 115 |
|
---|
[2c3969a] | 116 | <!-- In 3.53.x, parallel build was possible. See
|
---|
| 117 | http://lists.linuxfromscratch.org/pipermail/blfs-dev/2020-June/037498.html
|
---|
| 118 | for more information. -->
|
---|
| 119 |
|
---|
[a9b40fd] | 120 | <!-- And with another rebuild of nss-3.54, all is well again, but broken in 3.60 -->
|
---|
[dd1d0c08] | 121 | <!-- fixed again in 3.62
|
---|
[2c3969a] | 122 | <note>
|
---|
| 123 | <para>
|
---|
| 124 | This package does not support parallel build.
|
---|
| 125 | </para>
|
---|
[dd1d0c08] | 126 | </note>-->
|
---|
[2c3969a] | 127 |
|
---|
[9333a525] | 128 | <para>
|
---|
| 129 | Install <application>NSS</application> by running the following commands:
|
---|
| 130 | </para>
|
---|
| 131 |
|
---|
[a41a3ea9] | 132 | <screen><userinput>patch -Np1 -i ../nss-&nss-version;-standalone-1.patch &&
|
---|
[b6d3d395] | 133 |
|
---|
[299d5c54] | 134 | cd nss &&
|
---|
[2beaab8] | 135 |
|
---|
[dd1d0c08] | 136 | make BUILD_OPT=1 \
|
---|
[731d374] | 137 | NSPR_INCLUDE_DIR=/usr/include/nspr \
|
---|
| 138 | USE_SYSTEM_ZLIB=1 \
|
---|
| 139 | ZLIB_LIBS=-lz \
|
---|
[af9fba4] | 140 | NSS_ENABLE_WERROR=0 \
|
---|
[a45062d] | 141 | $([ $(uname -m) = x86_64 ] && echo USE_64=1) \
|
---|
[2beaab8] | 142 | $([ -f /usr/include/sqlite3.h ] && echo NSS_USE_SYSTEM_SQLITE=1)</userinput></screen>
|
---|
[9333a525] | 143 |
|
---|
| 144 | <para>
|
---|
[4158a9b] | 145 | <!-- the unittest files get compiled automatically since nss-3.31.0 -->
|
---|
[83996dc] | 146 | To run the tests, execute the following commands
|
---|
| 147 | (4 tests related to PayPal certificates are known to fail):
|
---|
[9333a525] | 148 | </para>
|
---|
[30f88917] | 149 |
|
---|
[b68a004] | 150 | <screen remap="test"><userinput>cd tests &&
|
---|
[c7768882] | 151 | HOST=localhost DOMSUF=localdomain ./all.sh
|
---|
[b68a004] | 152 | cd ../</userinput></screen>
|
---|
[8558044] | 153 |
|
---|
| 154 | <note>
|
---|
[73c6f44e] | 155 | <para>Some information about the tests:</para>
|
---|
| 156 | <itemizedlist spacing="compact">
|
---|
| 157 | <listitem>
|
---|
| 158 | <para>
|
---|
[6968e3cb] | 159 | HOST=localhost and DOMSUF=localdomain are required.
|
---|
[73c6f44e] | 160 | Without these variables, a FQDN is
|
---|
[fef4473] | 161 | required to be specified and this generic way should work for
|
---|
[b68a004] | 162 | everyone.
|
---|
[73c6f44e] | 163 | </para>
|
---|
| 164 | </listitem>
|
---|
| 165 | <listitem>
|
---|
| 166 | <para>
|
---|
| 167 | The tests take an extremely long time to run. If desired there is
|
---|
[8558044] | 168 | information in the all.sh script about running subsets of the
|
---|
[73c6f44e] | 169 | total test suite.
|
---|
| 170 | </para>
|
---|
| 171 | </listitem>
|
---|
| 172 | <listitem>
|
---|
| 173 | <para>
|
---|
| 174 | When interrupting the tests, the test suite
|
---|
[b68a004] | 175 | fails to spin down test servers that are run. This leads to an
|
---|
| 176 | infinite loop in the tests where the test suite tries to kill a server
|
---|
| 177 | that doesn't exist anymore because it pulls the wrong PID.
|
---|
[73c6f44e] | 178 | </para>
|
---|
| 179 | </listitem>
|
---|
| 180 | <listitem>
|
---|
| 181 | <para>
|
---|
[8558044] | 182 | Test suite results (in HTML format!) can be found at
|
---|
[73c6f44e] | 183 | ../../test_results/security/localhost.1/results.html
|
---|
| 184 | </para>
|
---|
| 185 | </listitem>
|
---|
| 186 | </itemizedlist>
|
---|
| 187 | </note>
|
---|
[b68a004] | 188 |
|
---|
[9333a525] | 189 | <para>
|
---|
| 190 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 191 | </para>
|
---|
| 192 |
|
---|
[2beaab8] | 193 | <screen role="root"><userinput>cd ../dist &&
|
---|
| 194 |
|
---|
| 195 | install -v -m755 Linux*/lib/*.so /usr/lib &&
|
---|
| 196 | install -v -m644 Linux*/lib/{*.chk,libcrmf.a} /usr/lib &&
|
---|
| 197 |
|
---|
| 198 | install -v -m755 -d /usr/include/nss &&
|
---|
| 199 | cp -v -RL {public,private}/nss/* /usr/include/nss &&
|
---|
| 200 | chmod -v 644 /usr/include/nss/* &&
|
---|
| 201 |
|
---|
[299d5c54] | 202 | install -v -m755 Linux*/bin/{certutil,nss-config,pk12util} /usr/bin &&
|
---|
[2beaab8] | 203 |
|
---|
[2b64864b] | 204 | install -v -m644 Linux*/lib/pkgconfig/nss.pc /usr/lib/pkgconfig</userinput></screen>
|
---|
[299d5c54] | 205 |
|
---|
[30f88917] | 206 | </sect2>
|
---|
| 207 |
|
---|
| 208 | <sect2 role="commands">
|
---|
| 209 | <title>Command Explanations</title>
|
---|
| 210 |
|
---|
[9333a525] | 211 | <para>
|
---|
| 212 | <parameter>BUILD_OPT=1</parameter>: This option is passed to
|
---|
| 213 | <command>make</command> so that the build is performed with no debugging
|
---|
| 214 | symbols built into the binaries and the default compiler optimizations are
|
---|
| 215 | used.
|
---|
| 216 | </para>
|
---|
| 217 |
|
---|
| 218 | <para>
|
---|
[0d7900a] | 219 | <parameter>NSPR_INCLUDE_DIR=/usr/include/nspr</parameter>: This option
|
---|
[9333a525] | 220 | sets the location of the nspr headers.
|
---|
| 221 | </para>
|
---|
| 222 |
|
---|
| 223 | <para>
|
---|
| 224 | <parameter>USE_SYSTEM_ZLIB=1</parameter>: This option is passed to
|
---|
| 225 | <command>make</command> to ensure that the
|
---|
| 226 | <filename class="libraryfile">libssl3.so</filename> library is linked to
|
---|
| 227 | the system installed <application>zlib</application> instead of the
|
---|
| 228 | in-tree version.
|
---|
| 229 | </para>
|
---|
| 230 |
|
---|
| 231 | <para>
|
---|
| 232 | <parameter>ZLIB_LIBS=-lz</parameter>: This option provides the
|
---|
| 233 | linker flags needed to link to the system <application>zlib</application>.
|
---|
| 234 | </para>
|
---|
[a45062d] | 235 |
|
---|
| 236 | <para>
|
---|
| 237 | <command>$([ $(uname -m) = x86_64 ] && echo USE_64=1)</command>:
|
---|
| 238 | The <parameter>USE_64=1</parameter> option is <emphasis>required on
|
---|
| 239 | x86_64</emphasis>, otherwise <command>make</command> will try (and fail)
|
---|
| 240 | to create 32-bit objects. The [ $(uname -m) = x86_64 ] test ensures it
|
---|
| 241 | has no effect on a 32 bit system.
|
---|
| 242 | </para>
|
---|
| 243 |
|
---|
| 244 | <para>
|
---|
| 245 | <command>([ -f /usr/include/sqlite3.h ] && echo
|
---|
| 246 | NSS_USE_SYSTEM_SQLITE=1)</command>: This tests if
|
---|
| 247 | <application>sqlite</application> is installed and if so it
|
---|
| 248 | <command>echo</command>s the option NSS_USE_SYSTEM_SQLITE=1 to
|
---|
| 249 | <command>make</command> so that
|
---|
| 250 | <filename class="libraryfile">libsoftokn3.so</filename> will link against
|
---|
| 251 | the system version of sqlite.
|
---|
| 252 | </para>
|
---|
[299d5c54] | 253 |
|
---|
[d65b11c] | 254 | <para>
|
---|
[26b48ac] | 255 | <option>NSS_DISABLE_GTESTS=1</option>: If you don't need to run
|
---|
[d65b11c] | 256 | NSS test suite, append this option to <command>make</command> command,
|
---|
| 257 | to prevent the compilation of tests and save some build time.
|
---|
| 258 | </para>
|
---|
| 259 |
|
---|
[30f88917] | 260 | </sect2>
|
---|
| 261 |
|
---|
[4a16903] | 262 | <sect2 role="configuration">
|
---|
| 263 | <title>Configuring NSS</title>
|
---|
| 264 |
|
---|
[47274444] | 265 | <para>
|
---|
| 266 | If <xref linkend="p11-kit"/> is installed, the
|
---|
| 267 | <application>p11-kit</application> trust module
|
---|
| 268 | (<filename>/usr/lib/pkcs11/p11-kit-trust.so</filename>) can be used as a
|
---|
| 269 | drop-in replacement for <filename>/usr/lib/libnssckbi.so</filename> to
|
---|
| 270 | transparently make the system CAs available to
|
---|
| 271 | <application>NSS</application> aware applications, rather than the static
|
---|
| 272 | list provided by <filename>/usr/lib/libnssckbi.so</filename>. As the
|
---|
| 273 | <systemitem class="username">root</systemitem> user, execute the following
|
---|
| 274 | commands:
|
---|
| 275 | </para>
|
---|
[4a16903] | 276 |
|
---|
[5c69a2d] | 277 | <screen role="root"><userinput>ln -sfv ./pkcs11/p11-kit-trust.so /usr/lib/libnssckbi.so</userinput></screen>
|
---|
[4a16903] | 278 |
|
---|
[47274444] | 279 | <para>
|
---|
| 280 | Additionally, for dependent applications that do not use the internal
|
---|
| 281 | database (<filename>/usr/lib/libnssckbi.so</filename>), the
|
---|
[fef4473] | 282 | <filename>/usr/sbin/make-ca</filename> script included on the
|
---|
[47274444] | 283 | <xref linkend="make-ca"/> page can generate a system wide NSS DB with the
|
---|
| 284 | <parameter>-n</parameter> switch, or by modifying the
|
---|
| 285 | <filename>/etc/make-ca.conf</filename> file.
|
---|
| 286 | </para>
|
---|
[4a16903] | 287 |
|
---|
| 288 | </sect2>
|
---|
| 289 |
|
---|
[30f88917] | 290 | <sect2 role="content">
|
---|
| 291 | <title>Contents</title>
|
---|
| 292 |
|
---|
| 293 | <segmentedlist>
|
---|
| 294 | <segtitle>Installed Programs</segtitle>
|
---|
| 295 | <segtitle>Installed Libraries</segtitle>
|
---|
| 296 | <segtitle>Installed Directories</segtitle>
|
---|
| 297 |
|
---|
| 298 | <seglistitem>
|
---|
[9333a525] | 299 | <seg>
|
---|
[299d5c54] | 300 | certutil, nss-config, and pk12util
|
---|
[61562907] | 301 | </seg>
|
---|
| 302 | <seg>
|
---|
[b68a004] | 303 | libcrmf.a, libfreebl3.so, libfreeblpriv3.so,
|
---|
| 304 | libnss3.so, libnssckbi.so, libnssckbi-testlib.so,
|
---|
[8558044] | 305 | libnssdbm3.so, libnsssysinit.so, libnssutil3.so,
|
---|
| 306 | libpkcs11testmodule.so, libsmime3.so, libsoftokn3.so,
|
---|
[23ed085] | 307 | and libssl3.so
|
---|
[61562907] | 308 | </seg>
|
---|
| 309 | <seg>
|
---|
| 310 | /usr/include/nss
|
---|
[9333a525] | 311 | </seg>
|
---|
[30f88917] | 312 | </seglistitem>
|
---|
| 313 | </segmentedlist>
|
---|
| 314 |
|
---|
| 315 | <variablelist>
|
---|
| 316 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 317 | <?dbfo list-presentation="list"?>
|
---|
| 318 | <?dbhtml list-presentation="table"?>
|
---|
| 319 |
|
---|
[9333a525] | 320 | <varlistentry id="certutil">
|
---|
| 321 | <term><command>certutil</command></term>
|
---|
| 322 | <listitem>
|
---|
| 323 | <para>
|
---|
| 324 | is the Mozilla Certificate Database Tool. It is a command-line
|
---|
| 325 | utility that can create and modify the Netscape Communicator
|
---|
| 326 | cert8.db and key3.db database files. It can also list, generate,
|
---|
| 327 | modify, or delete certificates within the cert8.db file and create
|
---|
| 328 | or change the password, generate new public and private key pairs,
|
---|
| 329 | display the contents of the key database, or delete key pairs within
|
---|
[4c24eb0a] | 330 | the key3.db file
|
---|
[9333a525] | 331 | </para>
|
---|
| 332 | <indexterm zone="nss certutil">
|
---|
| 333 | <primary sortas="b-certutil">certutil</primary>
|
---|
| 334 | </indexterm>
|
---|
| 335 | </listitem>
|
---|
| 336 | </varlistentry>
|
---|
| 337 |
|
---|
[299d5c54] | 338 | <varlistentry id="nss-config">
|
---|
| 339 | <term><command>nss-config</command></term>
|
---|
| 340 | <listitem>
|
---|
| 341 | <para>
|
---|
| 342 | is used to determine the NSS library settings of the installed NSS
|
---|
[4c24eb0a] | 343 | libraries
|
---|
[299d5c54] | 344 | </para>
|
---|
| 345 | <indexterm zone="nss nss-config">
|
---|
| 346 | <primary sortas="b-nss-config">nss-config</primary>
|
---|
| 347 | </indexterm>
|
---|
| 348 | </listitem>
|
---|
| 349 | </varlistentry>
|
---|
| 350 |
|
---|
[9333a525] | 351 | <varlistentry id="pk12util">
|
---|
| 352 | <term><command>pk12util</command></term>
|
---|
| 353 | <listitem>
|
---|
| 354 | <para>
|
---|
| 355 | is a tool for importing certificates and keys from pkcs #12 files
|
---|
| 356 | into NSS or exporting them. It can also list certificates and keys
|
---|
[4c24eb0a] | 357 | in such files
|
---|
[9333a525] | 358 | </para>
|
---|
| 359 | <indexterm zone="nss pk12util">
|
---|
| 360 | <primary sortas="b-pk12util">pk12util</primary>
|
---|
| 361 | </indexterm>
|
---|
| 362 | </listitem>
|
---|
| 363 | </varlistentry>
|
---|
[61562907] | 364 |
|
---|
[9333a525] | 365 | </variablelist>
|
---|
[61562907] | 366 |
|
---|
[30f88917] | 367 | </sect2>
|
---|
[61562907] | 368 |
|
---|
[30f88917] | 369 | </sect1>
|
---|