source: postlfs/security/p11-kit.xml@ 64be6a1

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.4 9.0 9.1 bdubbs/svn kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 64be6a1 was d973faf, checked in by DJ Lucas <dj@…>, 5 years ago

Update to make-ca-1.1. Complete configuration of P11-Kit trust-extract-compat to utilize both P11-kit and make-ca.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@20900 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 9.2 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 <!ENTITY p11-kit-download-http "https://github.com/p11-glue/p11-kit/releases/download/&p11-kit-version;/p11-kit-&p11-kit-version;.tar.gz">
8 <!ENTITY p11-kit-download-ftp " ">
9 <!ENTITY p11-kit-md5sum "85e1cdb5fce0087711ba2521975f0420">
10 <!ENTITY p11-kit-size "1.2 MB">
11 <!ENTITY p11-kit-buildsize "45 MB (add 168 MB for tests)">
12 <!ENTITY p11-kit-time "0.4 SBU (add 0.6 SBU for tests)">
13]>
14
15<sect1 id="p11-kit" xreflabel="p11-kit-&p11-kit-version;">
16 <?dbhtml filename="p11-kit.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>p11-kit-&p11-kit-version;</title>
24
25 <indexterm zone="p11-kit">
26 <primary sortas="a-p11-kit">p11-kit</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to p11-kit</title>
31
32 <para>
33 The <application>p11-kit</application> package provides a way to load and
34 enumerate PKCS #11 (a Cryptographic Token Interface Standard) modules.
35 </para>
36
37 &lfs83_checked;
38
39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing="compact">
41 <listitem>
42 <para>
43 Download (HTTP): <ulink url="&p11-kit-download-http;"/>
44 </para>
45 </listitem>
46 <listitem>
47 <para>
48 Download (FTP): <ulink url="&p11-kit-download-ftp;"/>
49 </para>
50 </listitem>
51 <listitem>
52 <para>
53 Download MD5 sum: &p11-kit-md5sum;
54 </para>
55 </listitem>
56 <listitem>
57 <para>
58 Download size: &p11-kit-size;
59 </para>
60 </listitem>
61 <listitem>
62 <para>
63 Estimated disk space required: &p11-kit-buildsize;
64 </para>
65 </listitem>
66 <listitem>
67 <para>
68 Estimated build time: &p11-kit-time;
69 </para>
70 </listitem>
71 </itemizedlist>
72
73 <bridgehead renderas="sect3">p11-kit Dependencies</bridgehead>
74
75 <bridgehead renderas="sect4">Recommended</bridgehead>
76 <para role="recommended">
77 <xref linkend="libtasn1"/>
78 </para>
79
80 <bridgehead renderas="sect4">Optional</bridgehead>
81 <para role="optional">
82 <xref linkend="make-ca"/> (runtime),
83 <xref linkend="nss"/> (runtime),
84 <xref linkend="gtk-doc"/> and
85 <xref linkend="libxslt"/>
86 </para>
87
88 <para condition="html" role="usernotes">User Notes:
89 <ulink url="&blfs-wiki;/p11-kit"/>
90 </para>
91 </sect2>
92
93 <sect2 role="installation">
94 <title>Installation of p11-kit</title>
95
96 <para>Prepare the distribution specific anchor hook:</para>
97
98<screen><userinput>sed '20,$ d' -i trust/trust-extract-compat.in &amp;&amp;
99cat &gt;&gt; trust/trust-extract-compat.in &lt;&lt; "EOF"
100<literal># LFS uses make-ca to manage certificates
101if [ -f /etc/make-ca.conf ]; then
102 . /etc/make-ca.conf
103else
104 #Use defaults if make-ca.conf does not exist
105 ANCHORDIR="/etc/pki/anchors"
106 ANCHORLIST="/etc/pki/anchors.txt"
107 LOCALDIR="/etc/ssl/local"
108 CERTLIST=""
109fi
110
111# Create a list of certificates not present at previous run
112for ca in `/bin/ls -1 --color=none "${ANCHORDIR}"` ; do
113 /bin/grep "${ca}" "${ANCHORLIST}" 2>&amp;1>/dev/null || CERTLIST="${CERTLIST} ${ca}"
114done
115
116# Dump to a temporary directory
117TEMPDIR=`mktemp -d`
118/usr/bin/trust extract --filter=certificates --format=openssl-directory --overwrite \
119 "${TEMPDIR}"
120
121# Copy new certificates to LOCALDIR
122for certificate in `echo "${CERTLIST}"` ; do
123 LABEL=`/bin/grep -m 1 "label:" "${ANCHORDIR}/${certificate}"`
124 LABELNEW=`echo "${LABEL}" | /bin/sed -e 's@^label: @@' -e 's@"@@g' -e 's@ @_@g'`
125 cp -v "${TEMPDIR}/${LABELNEW}.pem" "${LOCALDIR}"
126 unset LABEL LABELNEW
127done
128
129# Clean up
130rm -rf "${TEMPDIR}"
131unset ANCHORDIR ANCHORLIST LOCALDIR CERTLIST TEMPDIR
132
133# Generate a new trust store
134/usr/sbin/make-ca -f</literal>
135EOF</userinput></screen>
136
137 <para>
138 Install <application>p11-kit</application> by running the following
139 commands:
140 </para>
141
142<screen><userinput>./configure --prefix=/usr \
143 --sysconfdir=/etc \
144 --with-trust-paths=/etc/pki/anchors &amp;&amp;
145make</userinput></screen>
146
147 <para>
148 To test the results, issue: <command>make check</command>.
149 One test, test-token 6, is known to fail.
150 </para>
151
152 <para>
153 Now, as the <systemitem class="username">root</systemitem> user:
154 </para>
155
156<screen role="root"><userinput>make install &amp;&amp;
157ln -s /usr/libexec/p11-kit/trust-extract-compat \
158 /usr/bin/update-ca-certificates</userinput></screen>
159
160 </sect2>
161
162 <sect2 role="commands">
163 <title>Command Explanations</title>
164
165 <para>
166 <parameter>--with-trust-paths=/etc/pki/anchors</parameter>: this switch
167 sets the location of trusted certificates used by libp11-kit.so.
168 </para>
169
170 <para>
171 <option>--with-hash-impl=freebl</option>: Use this switch if you want to
172 use the Freebl library from <application>NSS</application> for SHA1 and
173 MD5 hashing.
174 </para>
175
176 <para>
177 <option>--enable-doc</option>: Use this switch if you have installed
178 <xref linkend="gtk-doc"/> and <xref linkend="libxslt"/> and wish to
179 rebuild the documentation and generate manual pages.
180 </para>
181
182 </sect2>
183
184 <sect2 role="configuration">
185 <title>Configuring p11-kit</title>
186
187 <para>The <application>p11-kit</application> trust module
188 (<filename>/usr/lib/pkcs11/p11-kit-trust.so</filename>) can be used as a
189 drop-in replacement for <filename>/usr/lib/libnssckbi.so</filename> to
190 transparently make the system CAs available to
191 <application>NSS</application> aware applications, rather than the static
192 list provided by <filename>/usr/lib/libnssckbi.so</filename>. As the
193 <systemitem class="username">root</systemitem> user, execute the following
194 commands:</para>
195
196<screen role="root"><userinput>if [ -e /usr/lib/libnssckbi.so ]; then
197 readlink /usr/lib/libnssckbi.so ||
198 rm -v /usr/lib/libnssckbi.so &amp;&amp;
199 ln -sfv ./pkcs11/p11-kit-trust.so /usr/lib/libnssckbi.so
200fi</userinput></screen>
201
202 </sect2>
203
204 <sect2 role="content">
205 <title>Contents</title>
206
207 <segmentedlist>
208 <segtitle>Installed Programs</segtitle>
209 <segtitle>Installed Libraries</segtitle>
210 <segtitle>Installed Directories</segtitle>
211
212 <seglistitem>
213 <seg>
214 p11-kit and trust
215 </seg>
216 <seg>
217 libp11-kit.so and p11-kit-proxy.so
218 </seg>
219 <seg>
220 /etc/pkcs11,
221 /usr/include/p11-kit-1,
222 /usr/lib/{p11-kit,pkcs11},
223 /usr/share/gtk-doc/html/p11-kit, and
224 /usr/share/p11-kit
225 </seg>
226 </seglistitem>
227 </segmentedlist>
228
229 <variablelist>
230 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
231 <?dbfo list-presentation="list"?>
232 <?dbhtml list-presentation="table"?>
233
234 <varlistentry id="p11-kit-prog">
235 <term><command>p11-kit</command></term>
236 <listitem>
237 <para>
238 is a command line tool that can be used to perform operations
239 on PKCS#11 modules configured on the system.
240 </para>
241 <indexterm zone="p11-kit p11-kit-prog">
242 <primary sortas="b-p11-kit">p11-kit</primary>
243 </indexterm>
244 </listitem>
245 </varlistentry>
246
247 <varlistentry id="trust">
248 <term><command>trust</command></term>
249 <listitem>
250 <para>
251 is a command line tool to examine and modify the shared trust
252 policy store.
253 </para>
254 <indexterm zone="p11-kit trust">
255 <primary sortas="b-trust">trust</primary>
256 </indexterm>
257 </listitem>
258 </varlistentry>
259
260 <varlistentry id="update-ca-certificates">
261 <term><command>update-ca-certificates</command></term>
262 <listitem>
263 <para>
264 is a command line tool to both extract local certificates from an
265 upadated anchor store, and regenerate all anchors and certificate
266 stores on the system.
267 </para>
268 <indexterm zone="p11-kit update-ca-certificates">
269 <primary sortas="b-trust">update-ca-certificates</primary>
270 </indexterm>
271 </listitem>
272 </varlistentry>
273
274 <varlistentry id="libp11-kit">
275 <term><filename class="libraryfile">libp11-kit.so</filename></term>
276 <listitem>
277 <para>
278 contains functions used to coordinate initialization and
279 finalization of any PKCS#11 module.
280 </para>
281 <indexterm zone="p11-kit libp11-kit">
282 <primary sortas="c-libp11-kit">libp11-kit.so</primary>
283 </indexterm>
284 </listitem>
285 </varlistentry>
286
287 <varlistentry id="p11-kit-proxy">
288 <term><filename class="libraryfile">p11-kit-proxy.so</filename></term>
289 <listitem>
290 <para>
291 is the PKCS#11 proxy module.
292 </para>
293 <indexterm zone="p11-kit p11-kit-proxy">
294 <primary sortas="c-p11-kit-proxy">p11-kit-proxy.so</primary>
295 </indexterm>
296 </listitem>
297 </varlistentry>
298
299 </variablelist>
300
301 </sect2>
302
303</sect1>
Note: See TracBrowser for help on using the repository browser.