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