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