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