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