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