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 | <!ENTITY nss-download-http "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_13_1_RTM/src/nss-&nss-version;.tar.gz">
|
---|
8 | <!ENTITY nss-download-ftp "ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_13_1_RTM/src/nss-&nss-version;.tar.gz">
|
---|
9 | <!ENTITY nss-md5sum "c500f96d33ba1390c8a35c667e05e542">
|
---|
10 | <!ENTITY nss-size "5.7 MB">
|
---|
11 | <!ENTITY nss-buildsize "44 MB (more than double this to run the test suite)">
|
---|
12 | <!ENTITY nss-time "0.7 SBU (at least an additional 3.5 SBU to run the test suite)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="nss" xreflabel="NSS-&nss-version;">
|
---|
16 | <?dbhtml filename="nss.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>NSS-&nss-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="nss">
|
---|
26 | <primary sortas="a-NSS">NSS</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to NSS</title>
|
---|
31 |
|
---|
32 | <para>The Network Security Services (<application>NSS</application>)
|
---|
33 | package is a set of libraries designed to support cross-platform
|
---|
34 | development of security-enabled client and server applications.
|
---|
35 | Applications built with NSS can support SSL v2 and v3, TLS, PKCS #5,
|
---|
36 | PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and other
|
---|
37 | security standards. This is useful for implementing SSL and S/MIME or
|
---|
38 | other Internet security standards into an application.</para>
|
---|
39 |
|
---|
40 | &lfs70_checked;
|
---|
41 |
|
---|
42 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
43 | <itemizedlist spacing="compact">
|
---|
44 | <listitem>
|
---|
45 | <para>Download (HTTP): <ulink url="&nss-download-http;"/></para>
|
---|
46 | </listitem>
|
---|
47 | <listitem>
|
---|
48 | <para>Download (FTP): <ulink url="&nss-download-ftp;"/></para>
|
---|
49 | </listitem>
|
---|
50 | <listitem>
|
---|
51 | <para>Download MD5 sum: &nss-md5sum;</para>
|
---|
52 | </listitem>
|
---|
53 | <listitem>
|
---|
54 | <para>Download size: &nss-size;</para>
|
---|
55 | </listitem>
|
---|
56 | <listitem>
|
---|
57 | <para>Estimated disk space required: &nss-buildsize;</para>
|
---|
58 | </listitem>
|
---|
59 | <listitem>
|
---|
60 | <para>Estimated build time: &nss-time;</para>
|
---|
61 | </listitem>
|
---|
62 | </itemizedlist>
|
---|
63 |
|
---|
64 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
65 | <itemizedlist spacing="compact">
|
---|
66 | <listitem>
|
---|
67 | <para>Required patch: <ulink
|
---|
68 | url="&patch-root;/nss-&nss-version;-standalone-1.patch"/></para>
|
---|
69 | </listitem>
|
---|
70 | </itemizedlist>
|
---|
71 |
|
---|
72 | <bridgehead renderas="sect3">NSS Dependencies</bridgehead>
|
---|
73 |
|
---|
74 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
75 | <para role="required"><xref linkend="nspr"/></para>
|
---|
76 |
|
---|
77 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
78 | <para role="recommended"><xref linkend="sqlite"/> (internal sqlite is
|
---|
79 | incompatable with existing or future installations)</para>
|
---|
80 |
|
---|
81 |
|
---|
82 | <para condition="html" role="usernotes">User Notes:
|
---|
83 | <ulink url="&blfs-wiki;/nss"/></para>
|
---|
84 |
|
---|
85 | </sect2>
|
---|
86 |
|
---|
87 | <sect2 role="installation">
|
---|
88 | <title>Installation of NSS</title>
|
---|
89 |
|
---|
90 | <para>Install <application>NSS</application> by running the following
|
---|
91 | commands:</para>
|
---|
92 |
|
---|
93 | <screen><userinput>bash
|
---|
94 | [ $(arch) = x86_64 ] && export USE_64=1
|
---|
95 | export BUILD_OPT=1 &&
|
---|
96 | cat /usr/include/sqlite3.h &> /dev/null &&
|
---|
97 | export NSS_USE_SYSTEM_SQLITE=1
|
---|
98 | export NSPR_INCLUDE_DIR=/usr/include/nspr &&
|
---|
99 | export USE_SYSTEM_ZLIB=1 &&
|
---|
100 | export ZLIB_LIBS=-lz &&
|
---|
101 | patch -Np1 -i ../nss-&nss-version;-standalone-1.patch &&
|
---|
102 | make -C mozilla/security/nss nss_build_all</userinput></screen>
|
---|
103 |
|
---|
104 | <para>If you wish to test the results, you'll need to set the domain name of
|
---|
105 | your system in the <envar>DOMSUF</envar> environment variable. Most of the
|
---|
106 | tests will fail if you don't provide the correct domain name. The voluminous
|
---|
107 | output will report how many of the several thousand tests passed, and if any
|
---|
108 | failed. To review the details of any failures, you may wish to capture
|
---|
109 | stdout and stderr in a file.</para>
|
---|
110 |
|
---|
111 | <para>To run the tests, ensure you change the
|
---|
112 | <command>export DOMSUF</command> command below to an appropriate value,
|
---|
113 | e.g., <parameter>mydomain.com</parameter> or, if you do not have any domain
|
---|
114 | in your <filename>/etc/hosts</filename> replace this with the developers'
|
---|
115 | recommendation of
|
---|
116 | <command>"export HOST=localhost DOMSUF=localdomain"</command> and issue the
|
---|
117 | following commands:</para>
|
---|
118 |
|
---|
119 | <screen><userinput>bash
|
---|
120 |
|
---|
121 | export NSS_LINUXDIR=$(basename `ls -d $PWD/mozilla/dist/Linux*`) &&
|
---|
122 | export DOMSUF=<replaceable><validdomain.name></replaceable> &&
|
---|
123 | export PATH=$PATH:$PWD/mozilla/dist/$NSS_LINUXDIR/bin &&
|
---|
124 | export TEST_RESULTSDIR=$PWD/mozilla/tests_results/security &&
|
---|
125 |
|
---|
126 | cd mozilla/security/nss/tests &&
|
---|
127 | sed -i 's/gmake/make/' common/init.sh &&
|
---|
128 | ./all.sh &&
|
---|
129 |
|
---|
130 | grep Passed $TEST_RESULTSDIR/$(hostname).1/results.html | wc -l &&
|
---|
131 |
|
---|
132 | exit</userinput></screen>
|
---|
133 |
|
---|
134 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
135 |
|
---|
136 | <screen role="root"><userinput>export NSS_LINUXDIR=$(basename `ls -d $PWD/mozilla/dist/Linux*`) &&
|
---|
137 | cd mozilla/dist &&
|
---|
138 | install -v -m755 $NSS_LINUXDIR/lib/*.so /usr/lib &&
|
---|
139 | install -v -m644 $NSS_LINUXDIR/lib/{*.chk,libcrmf.a} /usr/lib &&
|
---|
140 | install -v -m755 -d /usr/include/nss &&
|
---|
141 | install -v -m755 $NSS_LINUXDIR/bin/{certutil,nss-config,pk12util} /usr/bin &&
|
---|
142 | install -v -m644 $NSS_LINUXDIR/lib/pkgconfig/nss.pc /usr/lib/pkgconfig &&
|
---|
143 | cp -v -RL {public,private}/nss/* /usr/include/nss &&
|
---|
144 | chmod 644 /usr/include/nss/*</userinput></screen>
|
---|
145 |
|
---|
146 | <para>Now as the unprivileged user, exit the <command>bash</command>
|
---|
147 | shell started at the beginning of the installation to restore the
|
---|
148 | environment to the original state.</para>
|
---|
149 |
|
---|
150 | <screen><userinput>exit</userinput></screen>
|
---|
151 |
|
---|
152 | </sect2>
|
---|
153 |
|
---|
154 | <sect2 role="commands">
|
---|
155 | <title>Command Explanations</title>
|
---|
156 |
|
---|
157 | <para><command>bash</command>: Shells are started as many environment
|
---|
158 | variables are created during the installation process. Exiting the shells
|
---|
159 | serves the purpose of restoring the environment and returning back to the
|
---|
160 | original directory when the installation is complete.</para>
|
---|
161 |
|
---|
162 | <para><command>[ $(arch) = x86_64 ] && export USE_64=1</command>:
|
---|
163 | This command is <emphasis>required on x86_64</emphasis>, otherwise the
|
---|
164 | build will attempt to create 32-bit objects and fail in a non-multilib
|
---|
165 | system. The [ $(arch) = x86_64 ] test ensures it has no effect on a 32 bit
|
---|
166 | system.</para>
|
---|
167 |
|
---|
168 | <para><command>cat /usr/include/sqlite3.h ... </command>: tests if
|
---|
169 | <application>sqlite</application> is installed and if so it sets the
|
---|
170 | environment variable NSS_USE_SYSTEM_SQLITE=1 so that
|
---|
171 | <filename class="libraryfile">libsoftokn3.so</filename> will link against
|
---|
172 | the system version of sqlite.</para>
|
---|
173 |
|
---|
174 | <para><command>export BUILD_OPT=1</command>: This variable is set so that
|
---|
175 | the build is performed with no debugging symbols built into the binaries
|
---|
176 | and that the default compiler optimizations are used.</para>
|
---|
177 |
|
---|
178 | <para><command>export NSPR_INCLUDE_DIR=/usr/include/nspr</command>: This
|
---|
179 | command sets the location of the nspr headers.</para>
|
---|
180 |
|
---|
181 | <para><command>export USE_SYSTEM_ZLIB=1</command>: This command ensures that
|
---|
182 | the system installed library is used instead of the in-tree version.</para>
|
---|
183 |
|
---|
184 | <para><command>export ZLIB_LIBS=-lz</command>: This command provides the
|
---|
185 | needed linker flags to link to the system zlib.</para>
|
---|
186 |
|
---|
187 | <para><command>export NSS_LINUXDIR=...</command>: This variable is set so
|
---|
188 | that the exact name of the architecture specific directories where the
|
---|
189 | binaries are stored in the source tree can be determined.</para>
|
---|
190 |
|
---|
191 | <para><command>make -C mozilla/security/nss nss_build_all</command>: This
|
---|
192 | command builds the <application>NSS</application> libraries and creates a
|
---|
193 | <filename class='directory'>dist</filename> directory which houses all the
|
---|
194 | programs, libraries and interface headers. None of the programs created by
|
---|
195 | this process are installed onto the system using the default instructions
|
---|
196 | (except for <application>nss-config</application>). If you need any of
|
---|
197 | these programs installed, you can find them in the
|
---|
198 | <filename class='directory'>mozilla/*.OBJ/dist/bin</filename> directory of
|
---|
199 | the source tree.</para>
|
---|
200 |
|
---|
201 | <para><command>sed -i 's/gmake/make/' common/init.sh</command>: This
|
---|
202 | command changes the command used to compile some test programs.</para>
|
---|
203 |
|
---|
204 | </sect2>
|
---|
205 |
|
---|
206 | <sect2 role="content">
|
---|
207 | <title>Contents</title>
|
---|
208 |
|
---|
209 | <segmentedlist>
|
---|
210 | <segtitle>Installed Programs</segtitle>
|
---|
211 | <segtitle>Installed Libraries</segtitle>
|
---|
212 | <segtitle>Installed Directories</segtitle>
|
---|
213 |
|
---|
214 | <seglistitem>
|
---|
215 | <seg>nss-config</seg>
|
---|
216 | <seg>libcrmf.a, libfreebl3.so, libnss3.so, libnssckbi.so,
|
---|
217 | libnssdbm3.so, libnssutil3.so, libsmime3.so, libsoftokn3.so
|
---|
218 | and libssl3.so</seg>
|
---|
219 | <seg>/usr/include/nss</seg>
|
---|
220 | </seglistitem>
|
---|
221 | </segmentedlist>
|
---|
222 |
|
---|
223 | <variablelist>
|
---|
224 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
225 | <?dbfo list-presentation="list"?>
|
---|
226 | <?dbhtml list-presentation="table"?>
|
---|
227 |
|
---|
228 | <varlistentry id="nss-config">
|
---|
229 | <term><command>nss-config</command></term>
|
---|
230 | <listitem>
|
---|
231 | <para>is used to determine the NSS library settings
|
---|
232 | of the installed NSS libraries.</para>
|
---|
233 | <indexterm zone="nss nss-config">
|
---|
234 | <primary sortas="b-nss-config">nss-config</primary>
|
---|
235 | </indexterm>
|
---|
236 | </listitem>
|
---|
237 | </varlistentry>
|
---|
238 | </variablelist>
|
---|
239 |
|
---|
240 | </sect2>
|
---|
241 |
|
---|
242 | </sect1>
|
---|