source: postlfs/security/nss.xml@ faa948c

12.0 12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since faa948c was 7481fd4, checked in by Douglas R. Reno <renodr@…>, 10 months ago

Tags

  • Property mode set to 100644
File size: 13.8 KB
RevLine 
[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 " ">
[d7cb919]16 <!ENTITY nss-md5sum "589167c3be81d09b9e332ff17d46ebca">
[7939b3d8]17 <!ENTITY nss-size "69 MB">
[d7cb919]18 <!ENTITY nss-buildsize "299 MB (add 261 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)">
[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
[7939b3d8]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 -->
[30f88917]39]>
40
[b4ca8bb]41<sect1 id="nss" xreflabel="nss-&nss-version;">
[30f88917]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
[9333a525]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>
[30f88917]63
[7481fd4]64 &lfs120_checked;
[e3060aa]65
[30f88917]66 <bridgehead renderas="sect3">Package Information</bridgehead>
67 <itemizedlist spacing="compact">
68 <listitem>
[9333a525]69 <para>
70 Download (HTTP): <ulink url="&nss-download-http;"/>
71 </para>
[30f88917]72 </listitem>
73 <listitem>
[9333a525]74 <para>
75 Download (FTP): <ulink url="&nss-download-ftp;"/>
76 </para>
[30f88917]77 </listitem>
78 <listitem>
[9333a525]79 <para>
[0f62b2b]80 Download MD5 sum: &nss-md5sum;
81 </para>
[30f88917]82 </listitem>
83 <listitem>
[9333a525]84 <para>
85 Download size: &nss-size;
86 </para>
[30f88917]87 </listitem>
88 <listitem>
[9333a525]89 <para>
90 Estimated disk space required: &nss-buildsize;
91 </para>
[30f88917]92 </listitem>
93 <listitem>
[9333a525]94 <para>
95 Estimated build time: &nss-time;
96 </para>
[30f88917]97 </listitem>
98 </itemizedlist>
99
[299d5c54]100 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
101 <itemizedlist spacing="compact">
102 <listitem>
103 <para>
104 Required patch:
[a41a3ea9]105 <ulink url="&patch-root;/nss-&nss-version;-standalone-1.patch"/>
[299d5c54]106 </para>
107 </listitem>
[907a269]108<!--
[2980344]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>
[907a269]116-->
[299d5c54]117 </itemizedlist>
118
[dd44df7e]119 <bridgehead renderas="sect3">NSS Dependencies</bridgehead>
120
121 <bridgehead renderas="sect4">Required</bridgehead>
[9333a525]122 <para role="required">
123 <xref linkend="nspr"/>
124 </para>
[dd44df7e]125
126 <bridgehead renderas="sect4">Recommended</bridgehead>
[9333a525]127 <para role="recommended">
[96e9478]128 <xref linkend="sqlite"/> and
129 <xref role="runtime" linkend="p11-kit"/> (runtime)
[9333a525]130 </para>
[dd44df7e]131
[9333a525]132 <para condition="html" role="usernotes">
[42ddc30]133 Editor Notes: <ulink url="&blfs-wiki;/nss"/>
[9333a525]134 </para>
[30f88917]135 </sect2>
136
137 <sect2 role="installation">
138 <title>Installation of NSS</title>
139
[907a269]140<!--
[2c3969a]141 <note>
142 <para>
[2980344]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:
[2c3969a]149 </para>
[cd29bc9]150 </note>
[2980344]151
152<screen><userinput>grep -q adx /proc/cpuinfo || \
153patch -Np1 -i ../nss-&nss-version;-illegal_instruction-1.patch</userinput></screen>
[2c3969a]154
[907a269]155-->
[9333a525]156 <para>
157 Install <application>NSS</application> by running the following commands:
158 </para>
159
[a41a3ea9]160<screen><userinput>patch -Np1 -i ../nss-&nss-version;-standalone-1.patch &amp;&amp;
[b6d3d395]161
[299d5c54]162cd nss &amp;&amp;
[2beaab8]163
[dd1d0c08]164make BUILD_OPT=1 \
[731d374]165 NSPR_INCLUDE_DIR=/usr/include/nspr \
166 USE_SYSTEM_ZLIB=1 \
167 ZLIB_LIBS=-lz \
[af9fba4]168 NSS_ENABLE_WERROR=0 \
[a45062d]169 $([ $(uname -m) = x86_64 ] &amp;&amp; echo USE_64=1) \
[2beaab8]170 $([ -f /usr/include/sqlite3.h ] &amp;&amp; echo NSS_USE_SYSTEM_SQLITE=1)</userinput></screen>
[9333a525]171
172 <para>
[4158a9b]173 <!-- the unittest files get compiled automatically since nss-3.31.0 -->
[9e1670e1]174 To run the tests, execute the following commands<!--(1 test is known to fail)-->:
[9333a525]175 </para>
[30f88917]176
[b68a004]177<screen remap="test"><userinput>cd tests &amp;&amp;
[c7768882]178HOST=localhost DOMSUF=localdomain ./all.sh
[b68a004]179cd ../</userinput></screen>
[8558044]180
181 <note>
[73c6f44e]182 <para>Some information about the tests:</para>
183 <itemizedlist spacing="compact">
184 <listitem>
185 <para>
[6968e3cb]186 HOST=localhost and DOMSUF=localdomain are required.
[73c6f44e]187 Without these variables, a FQDN is
[fef4473]188 required to be specified and this generic way should work for
[b0b536c]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
[6a6d01e]192 LFS book</ulink>.
[73c6f44e]193 </para>
194 </listitem>
195 <listitem>
196 <para>
[7939b3d8]197 The tests take a long time to run. If desired there is
[8558044]198 information in the all.sh script about running subsets of the
[73c6f44e]199 total test suite.
200 </para>
201 </listitem>
202 <listitem>
203 <para>
204 When interrupting the tests, the test suite
[b68a004]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.
[73c6f44e]208 </para>
209 </listitem>
210 <listitem>
211 <para>
[8558044]212 Test suite results (in HTML format!) can be found at
[73c6f44e]213 ../../test_results/security/localhost.1/results.html
214 </para>
215 </listitem>
[0d7f7190]216 <listitem>
217 <para>
218 A few tests might fail on some Intel machines for unknown reasons.
219 </para>
220 </listitem>
[73c6f44e]221 </itemizedlist>
222 </note>
[b68a004]223
[9333a525]224 <para>
225 Now, as the <systemitem class="username">root</systemitem> user:
226 </para>
227
[2beaab8]228<screen role="root"><userinput>cd ../dist &amp;&amp;
229
230install -v -m755 Linux*/lib/*.so /usr/lib &amp;&amp;
231install -v -m644 Linux*/lib/{*.chk,libcrmf.a} /usr/lib &amp;&amp;
232
233install -v -m755 -d /usr/include/nss &amp;&amp;
234cp -v -RL {public,private}/nss/* /usr/include/nss &amp;&amp;
235
[299d5c54]236install -v -m755 Linux*/bin/{certutil,nss-config,pk12util} /usr/bin &amp;&amp;
[2beaab8]237
[2b64864b]238install -v -m644 Linux*/lib/pkgconfig/nss.pc /usr/lib/pkgconfig</userinput></screen>
[299d5c54]239
[30f88917]240 </sect2>
241
242 <sect2 role="commands">
243 <title>Command Explanations</title>
244
[9333a525]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>
[0d7900a]253 <parameter>NSPR_INCLUDE_DIR=/usr/include/nspr</parameter>: This option
[9333a525]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>
[a45062d]269
270 <para>
271 <command>$([ $(uname -m) = x86_64 ] &amp;&amp; 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 ] &amp;&amp; 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>
[299d5c54]287
[d65b11c]288 <para>
[26b48ac]289 <option>NSS_DISABLE_GTESTS=1</option>: If you don't need to run
[d65b11c]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
[30f88917]294 </sect2>
295
[4a16903]296 <sect2 role="configuration">
297 <title>Configuring NSS</title>
298
[47274444]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
[01e2c90]308 command:
[47274444]309 </para>
[4a16903]310
[5c69a2d]311<screen role="root"><userinput>ln -sfv ./pkcs11/p11-kit-trust.so /usr/lib/libnssckbi.so</userinput></screen>
[4a16903]312
[47274444]313 <para>
314 Additionally, for dependent applications that do not use the internal
315 database (<filename>/usr/lib/libnssckbi.so</filename>), the
[fef4473]316 <filename>/usr/sbin/make-ca</filename> script included on the
[47274444]317 <xref linkend="make-ca"/> page can generate a system wide NSS DB with the
318 <parameter>-n</parameter> switch, or by modifying the
[0771e2f]319 <filename>/etc/make-ca/make-ca.conf</filename> file.
[47274444]320 </para>
[4a16903]321
322 </sect2>
323
[30f88917]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>
[9333a525]333 <seg>
[299d5c54]334 certutil, nss-config, and pk12util
[61562907]335 </seg>
336 <seg>
[b68a004]337 libcrmf.a, libfreebl3.so, libfreeblpriv3.so,
338 libnss3.so, libnssckbi.so, libnssckbi-testlib.so,
[8558044]339 libnssdbm3.so, libnsssysinit.so, libnssutil3.so,
340 libpkcs11testmodule.so, libsmime3.so, libsoftokn3.so,
[23ed085]341 and libssl3.so
[61562907]342 </seg>
343 <seg>
344 /usr/include/nss
[9333a525]345 </seg>
[30f88917]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
[9333a525]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
[4c24eb0a]364 the key3.db file
[9333a525]365 </para>
366 <indexterm zone="nss certutil">
367 <primary sortas="b-certutil">certutil</primary>
368 </indexterm>
369 </listitem>
370 </varlistentry>
371
[299d5c54]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
[4c24eb0a]377 libraries
[299d5c54]378 </para>
379 <indexterm zone="nss nss-config">
380 <primary sortas="b-nss-config">nss-config</primary>
381 </indexterm>
382 </listitem>
383 </varlistentry>
384
[9333a525]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
[4c24eb0a]391 in such files
[9333a525]392 </para>
393 <indexterm zone="nss pk12util">
394 <primary sortas="b-pk12util">pk12util</primary>
395 </indexterm>
396 </listitem>
397 </varlistentry>
[61562907]398
[9333a525]399 </variablelist>
[61562907]400
[30f88917]401 </sect2>
[61562907]402
[30f88917]403</sect1>
Note: See TracBrowser for help on using the repository browser.