source: postlfs/security/nss.xml@ fccb7d3d

12.0 12.1 12.2 gimp3 ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/for-12.3 xry111/llvm18 xry111/spidermonkey128
Last change on this file since fccb7d3d was 2980344, checked in by Pierre Labastie <pierre.labastie@…>, 16 months ago

nss: prevent illegal instruction on old processors

  • Property mode set to 100644
File size: 13.8 KB
Line 
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 "d83c24d03fb4f9a7f688b5d7c6938972">
17 <!ENTITY nss-size "69 MB">
18 <!ENTITY nss-buildsize "295 MB (add 140 MB for tests)">
19 <!ENTITY nss-time "0.9 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.90:
32 Passed: 68593
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 &lfs113_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 <listitem>
109 <para>
110 Required patch for processors lacking the <quote>adx</quote>
111 instruction set:
112 <ulink url="&patch-root;/nss-&nss-version;-illegal_instruction-1.patch"/>
113 </para>
114 </listitem>
115 </itemizedlist>
116
117 <bridgehead renderas="sect3">NSS Dependencies</bridgehead>
118
119 <bridgehead renderas="sect4">Required</bridgehead>
120 <para role="required">
121 <xref linkend="nspr"/>
122 </para>
123
124 <bridgehead renderas="sect4">Recommended</bridgehead>
125 <para role="recommended">
126 <xref linkend="sqlite"/> and
127 <xref role="runtime" linkend="p11-kit"/> (runtime)
128 </para>
129
130 <para condition="html" role="usernotes">
131 User Notes: <ulink url="&blfs-wiki;/nss"/>
132 </para>
133 </sect2>
134
135 <sect2 role="installation">
136 <title>Installation of NSS</title>
137
138 <note>
139 <para>
140 Some old generations processors lack an assembler instruction that
141 is generated unconditionally by NSS-3.90. It leads to an
142 "illegal instruction" fault when running firefox. The availability
143 of this instruction is asserted by the <quote>adx</quote> flag
144 in <filename>/proc/cpuinfo</filename>. If this flag is not set,
145 apply the following patch:
146 </para>
147 </note>
148
149<screen><userinput>grep -q adx /proc/cpuinfo || \
150patch -Np1 -i ../nss-&nss-version;-illegal_instruction-1.patch</userinput></screen>
151
152 <para>
153 Install <application>NSS</application> by running the following commands:
154 </para>
155
156<screen><userinput>patch -Np1 -i ../nss-&nss-version;-standalone-1.patch &amp;&amp;
157
158cd nss &amp;&amp;
159
160make BUILD_OPT=1 \
161 NSPR_INCLUDE_DIR=/usr/include/nspr \
162 USE_SYSTEM_ZLIB=1 \
163 ZLIB_LIBS=-lz \
164 NSS_ENABLE_WERROR=0 \
165 $([ $(uname -m) = x86_64 ] &amp;&amp; echo USE_64=1) \
166 $([ -f /usr/include/sqlite3.h ] &amp;&amp; echo NSS_USE_SYSTEM_SQLITE=1)</userinput></screen>
167
168 <para>
169 <!-- the unittest files get compiled automatically since nss-3.31.0 -->
170 To run the tests, execute the following commands<!--(1 test is known to fail)-->:
171 </para>
172
173<screen remap="test"><userinput>cd tests &amp;&amp;
174HOST=localhost DOMSUF=localdomain ./all.sh
175cd ../</userinput></screen>
176
177 <note>
178 <para>Some information about the tests:</para>
179 <itemizedlist spacing="compact">
180 <listitem>
181 <para>
182 HOST=localhost and DOMSUF=localdomain are required.
183 Without these variables, a FQDN is
184 required to be specified and this generic way should work for
185 everyone, provided <systemitem>localhost.localdomain</systemitem>
186 is defined in <filename>/etc/hosts</filename>, as done in
187 <ulink url="&lfs-root;/chapter09/network.html#ch-config-hosts">the
188 LFS book</ulink>.
189 </para>
190 </listitem>
191 <listitem>
192 <para>
193 The tests take a long time to run. If desired there is
194 information in the all.sh script about running subsets of the
195 total test suite.
196 </para>
197 </listitem>
198 <listitem>
199 <para>
200 When interrupting the tests, the test suite
201 fails to spin down test servers that are run. This leads to an
202 infinite loop in the tests where the test suite tries to kill a server
203 that doesn't exist anymore because it pulls the wrong PID.
204 </para>
205 </listitem>
206 <listitem>
207 <para>
208 Test suite results (in HTML format!) can be found at
209 ../../test_results/security/localhost.1/results.html
210 </para>
211 </listitem>
212 <listitem>
213 <para>
214 A few tests might fail on some Intel machines for unknown reasons.
215 </para>
216 </listitem>
217 </itemizedlist>
218 </note>
219
220 <para>
221 Now, as the <systemitem class="username">root</systemitem> user:
222 </para>
223
224<screen role="root"><userinput>cd ../dist &amp;&amp;
225
226install -v -m755 Linux*/lib/*.so /usr/lib &amp;&amp;
227install -v -m644 Linux*/lib/{*.chk,libcrmf.a} /usr/lib &amp;&amp;
228
229install -v -m755 -d /usr/include/nss &amp;&amp;
230cp -v -RL {public,private}/nss/* /usr/include/nss &amp;&amp;
231
232install -v -m755 Linux*/bin/{certutil,nss-config,pk12util} /usr/bin &amp;&amp;
233
234install -v -m644 Linux*/lib/pkgconfig/nss.pc /usr/lib/pkgconfig</userinput></screen>
235
236 </sect2>
237
238 <sect2 role="commands">
239 <title>Command Explanations</title>
240
241 <para>
242 <parameter>BUILD_OPT=1</parameter>: This option is passed to
243 <command>make</command> so that the build is performed with no debugging
244 symbols built into the binaries and the default compiler optimizations are
245 used.
246 </para>
247
248 <para>
249 <parameter>NSPR_INCLUDE_DIR=/usr/include/nspr</parameter>: This option
250 sets the location of the nspr headers.
251 </para>
252
253 <para>
254 <parameter>USE_SYSTEM_ZLIB=1</parameter>: This option is passed to
255 <command>make</command> to ensure that the
256 <filename class="libraryfile">libssl3.so</filename> library is linked to
257 the system installed <application>zlib</application> instead of the
258 in-tree version.
259 </para>
260
261 <para>
262 <parameter>ZLIB_LIBS=-lz</parameter>: This option provides the
263 linker flags needed to link to the system <application>zlib</application>.
264 </para>
265
266 <para>
267 <command>$([ $(uname -m) = x86_64 ] &amp;&amp; echo USE_64=1)</command>:
268 The <parameter>USE_64=1</parameter> option is <emphasis>required on
269 x86_64</emphasis>, otherwise <command>make</command> will try (and fail)
270 to create 32-bit objects. The [ $(uname -m) = x86_64 ] test ensures it
271 has no effect on a 32 bit system.
272 </para>
273
274 <para>
275 <command>([ -f /usr/include/sqlite3.h ] &amp;&amp; echo
276 NSS_USE_SYSTEM_SQLITE=1)</command>: This tests if
277 <application>sqlite</application> is installed and if so it
278 <command>echo</command>s the option NSS_USE_SYSTEM_SQLITE=1 to
279 <command>make</command> so that
280 <filename class="libraryfile">libsoftokn3.so</filename> will link against
281 the system version of sqlite.
282 </para>
283
284 <para>
285 <option>NSS_DISABLE_GTESTS=1</option>: If you don't need to run
286 NSS test suite, append this option to <command>make</command> command,
287 to prevent the compilation of tests and save some build time.
288 </para>
289
290 </sect2>
291
292 <sect2 role="configuration">
293 <title>Configuring NSS</title>
294
295 <para>
296 If <xref linkend="p11-kit"/> is installed, the
297 <application>p11-kit</application> trust module
298 (<filename>/usr/lib/pkcs11/p11-kit-trust.so</filename>) can be used as a
299 drop-in replacement for <filename>/usr/lib/libnssckbi.so</filename> to
300 transparently make the system CAs available to
301 <application>NSS</application> aware applications, rather than the static
302 list provided by <filename>/usr/lib/libnssckbi.so</filename>. As the
303 <systemitem class="username">root</systemitem> user, execute the following
304 command:
305 </para>
306
307<screen role="root"><userinput>ln -sfv ./pkcs11/p11-kit-trust.so /usr/lib/libnssckbi.so</userinput></screen>
308
309 <para>
310 Additionally, for dependent applications that do not use the internal
311 database (<filename>/usr/lib/libnssckbi.so</filename>), the
312 <filename>/usr/sbin/make-ca</filename> script included on the
313 <xref linkend="make-ca"/> page can generate a system wide NSS DB with the
314 <parameter>-n</parameter> switch, or by modifying the
315 <filename>/etc/make-ca/make-ca.conf</filename> file.
316 </para>
317
318 </sect2>
319
320 <sect2 role="content">
321 <title>Contents</title>
322
323 <segmentedlist>
324 <segtitle>Installed Programs</segtitle>
325 <segtitle>Installed Libraries</segtitle>
326 <segtitle>Installed Directories</segtitle>
327
328 <seglistitem>
329 <seg>
330 certutil, nss-config, and pk12util
331 </seg>
332 <seg>
333 libcrmf.a, libfreebl3.so, libfreeblpriv3.so,
334 libnss3.so, libnssckbi.so, libnssckbi-testlib.so,
335 libnssdbm3.so, libnsssysinit.so, libnssutil3.so,
336 libpkcs11testmodule.so, libsmime3.so, libsoftokn3.so,
337 and libssl3.so
338 </seg>
339 <seg>
340 /usr/include/nss
341 </seg>
342 </seglistitem>
343 </segmentedlist>
344
345 <variablelist>
346 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
347 <?dbfo list-presentation="list"?>
348 <?dbhtml list-presentation="table"?>
349
350 <varlistentry id="certutil">
351 <term><command>certutil</command></term>
352 <listitem>
353 <para>
354 is the Mozilla Certificate Database Tool. It is a command-line
355 utility that can create and modify the Netscape Communicator
356 cert8.db and key3.db database files. It can also list, generate,
357 modify, or delete certificates within the cert8.db file and create
358 or change the password, generate new public and private key pairs,
359 display the contents of the key database, or delete key pairs within
360 the key3.db file
361 </para>
362 <indexterm zone="nss certutil">
363 <primary sortas="b-certutil">certutil</primary>
364 </indexterm>
365 </listitem>
366 </varlistentry>
367
368 <varlistentry id="nss-config">
369 <term><command>nss-config</command></term>
370 <listitem>
371 <para>
372 is used to determine the NSS library settings of the installed NSS
373 libraries
374 </para>
375 <indexterm zone="nss nss-config">
376 <primary sortas="b-nss-config">nss-config</primary>
377 </indexterm>
378 </listitem>
379 </varlistentry>
380
381 <varlistentry id="pk12util">
382 <term><command>pk12util</command></term>
383 <listitem>
384 <para>
385 is a tool for importing certificates and keys from pkcs #12 files
386 into NSS or exporting them. It can also list certificates and keys
387 in such files
388 </para>
389 <indexterm zone="nss pk12util">
390 <primary sortas="b-pk12util">pk12util</primary>
391 </indexterm>
392 </listitem>
393 </varlistentry>
394
395 </variablelist>
396
397 </sect2>
398
399</sect1>
Note: See TracBrowser for help on using the repository browser.