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