source: postlfs/security/make-ca.xml@ 82bdecf

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.0 9.1 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 82bdecf was 82bdecf, checked in by Bruce Dubbs <bdubbs@…>, 5 years ago

Tag Xorg and it's dependencies.
Some misc text tweaks.

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

  • Property mode set to 100644
File size: 13.0 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 certhost "https://hg.mozilla.org/">
8 <!ENTITY certpath "/lib/ckfw/builtins/certdata.txt">
9 <!ENTITY make-ca-buildsize "6.6 MB (with all runtime deps)">
10 <!ENTITY make-ca-time "0.1 SBU (with all runtime deps)">
11
12 <!ENTITY make-ca-download "https://github.com/djlucas/make-ca/releases/download/v&make-ca-version;/make-ca-&make-ca-version;.tar.xz">
13 <!ENTITY make-ca-size "28 KB">
14 <!ENTITY make-ca-md5sum "995896ca8b4ee1f92a4a8fa46585d59d">
15]>
16
17<sect1 id="make-ca" xreflabel="make-ca-&make-ca-version;">
18 <?dbhtml filename="make-ca.html"?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
25 <title>make-ca-&make-ca-version;</title>
26 <indexterm zone="make-ca">
27 <primary sortas="a-make-ca">make-ca</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to make-ca</title>
32
33 <para>
34 Public Key Infrastructure (PKI) is a method to validate the authenticity
35 of an otherwise unknown entity across untrusted networks. PKI works by
36 establishing a chain of trust, rather than trusting each individual host
37 or entity explicitly. In order for a certificate presented by a remote
38 entity to be trusted, that certificate must present a complete chain of
39 certificates that can be validated using the root certificate of a
40 Certificate Authority (CA) that is trusted by the local machine.
41 </para>
42
43 <para>
44 Establishing trust with a CA involves validating things like company
45 address, ownership, contact information, etc., and ensuring that the CA
46 has followed best practices, such as undergoing periodic security audits
47 by independent investigators and maintaining an always available
48 certificate revocation list. This is well outside the scope of BLFS (as
49 it is for most Linux distributions). The certificate store provided here
50 is taken from the Mozilla Foundation, who have established very strict
51 inclusion policies described <ulink
52 url="https://www.mozilla.org/en-US/about/governance/policies/security-group/certs/">here</ulink>.
53 </para>
54
55 &lfs90_checked;
56
57 <bridgehead renderas="sect3">Package Information</bridgehead>
58 <itemizedlist spacing="compact">
59 <listitem>
60 <para>Download (HTTP): <ulink url="&make-ca-download;"/></para>
61 </listitem>
62 <listitem>
63 <para>Download size: &make-ca-size;</para>
64 </listitem>
65 <listitem>
66 <para>Download MD5 Sum: &make-ca-md5sum;</para>
67 </listitem>
68 <listitem>
69 <para>Estimated disk space required: &make-ca-buildsize;</para>
70 </listitem>
71 <listitem>
72 <para>Estimated build time: &make-ca-time;</para>
73 </listitem>
74 </itemizedlist>
75
76 <bridgehead renderas="sect3">make-ca Dependencies</bridgehead>
77
78 <bridgehead renderas="sect4">Required</bridgehead>
79 <para role="required"><xref linkend="p11-kit"/> (required at runtime to
80 generate certificate stores from trust anchors)</para>
81 <!-- /usr/bin/trust is needed to extract the certs to /etc/ssl/certs -->
82
83 <bridgehead renderas="sect4">Optional (runtime)</bridgehead>
84 <para role="optional">
85 <xref role="runtime" linkend="java"/> or
86 <xref role="runtime" linkend="openjdk"/> (to generate a java PKCS#12
87 store), and <xref role="runtime" linkend="nss"/> (to generate a shared
88 NSSDB)
89 </para>
90
91 <para condition="html" role="usernotes">User Notes:
92 <ulink url='&blfs-wiki;/make-ca'/></para>
93 </sect2>
94
95 <sect2 role="installation">
96 <title>Installation of make-ca</title>
97
98 <para>The <application>make-ca</application> script will download and
99 process the certificates included in the <filename>certdata.txt</filename>
100 file for use as trust anchors for the <xref linkend="p11-kit"/> trust
101 module. Additionally, it will generate system certificate stores used by
102 BLFS applications (if the recommended and optional applications are present
103 on the system). Any local certificates stored in
104 <filename>/etc/ssl/local</filename> will be imported to both the trust
105 anchors and the generated certificate stores (overriding Mozilla's
106 trust). Additionally, any modified trust values will be copied from the
107 trust anchors to <filename>/etc/ssl/local</filename> prior to any updates,
108 preserving custom trust values that differ from Mozilla when using the
109 <command>trust</command> utility from <application>p11-kit</application>
110 to operate on the trust store.</para>
111
112 <para>To install the various certificate stores, first install the
113 <application>make-ca</application> script into the correct location.
114 As the <systemitem class="username">root</systemitem> user:</para>
115
116<screen role="root"><userinput>make install &amp;&amp;
117install -vdm755 /etc/ssl/local</userinput></screen>
118
119 <para>As the <systemitem class="username">root</systemitem> user, after
120 installing <xref linkend="p11-kit"/>, download the certificate source and
121 prepare for system use with the following command:</para>
122
123 <note>
124 <para>If running the script a second time with the same version of
125 <filename>certdata.txt</filename>, for instance, to add additional stores
126 as the requisite software is installed, add the <parameter>-r</parameter>
127 switch to the command line. If packaging, run <command>make-ca
128 --help</command> to see all available command line options.</para>
129 </note>
130
131<screen role="root"><userinput>/usr/sbin/make-ca -g</userinput></screen>
132
133 <!-- Remove at 8.5 or 9.0 -->
134 <para>Previous versions of BLFS used the path
135 <filename>/etc/ssl/ca-bundle.crt</filename> for the
136 <xref linkend="gnutls"/> certificate store. If software is still installed
137 that references this file, create a compatibility symlink for the old
138 location as the <systemitem class="username">root</systemitem> user:</para>
139
140<screen role="nodump"><userinput>ln -sfv /etc/pki/tls/certs/ca-bundle.crt /etc/ssl/ca-bundle.crt</userinput></screen>
141
142 <para>You should periodically update the store with the above command,
143 either manually, or via a <phrase revision="sysv">cron job.</phrase>
144 <phrase revision="systemd">systemd timer. A timer is installed at
145 <filename>/usr/lib/systemd/system/update-pki.timer</filename> that, if
146 enabled, will check for updates weekly. </phrase><phrase revision="sysv">If
147 you've installed <xref linkend="fcron"/> and completed the section on
148 periodic jobs, execute</phrase><phrase revision="systemd">Execute</phrase>
149 the following commands, as the
150 <systemitem class="username">root</systemitem> user, to
151 <phrase revision="sysv">create a weekly cron job:</phrase>
152 <phrase revision="systemd">enable the systemd timer:</phrase>
153 </para>
154
155<screen role="root" revision="sysv"><userinput>install -vdm755 /etc/cron.weekly &amp;&amp;
156cat &gt; /etc/cron.weekly/update-pki.sh &lt;&lt; "EOF" &amp;&amp;
157<literal>#!/bin/bash
158/usr/sbin/make-ca -g</literal>
159EOF
160chmod 754 /etc/cron.weekly/update-pki.sh</userinput></screen>
161
162<screen role="root" revision="systemd"><userinput>systemctl enable update-pki.timer</userinput></screen>
163
164 </sect2>
165
166 <sect2 role="configuration" id="make-ca-config">
167 <title>Configuring make-ca</title>
168
169 <para>For most users, no additional configuration is necessary, however,
170 the default <filename>certdata.txt</filename> file provided by make-ca
171 is obtained from the mozilla-release branch, and is modified to provide a
172 Mercurial revision. This will be the correct version for most systems.
173 There are several other variants of the file available for use that might
174 be preferred for one reason or another, including the files shipped with
175 Mozilla products in this book. RedHat and OpenSUSE, for instance, use the
176 version included in <xref linkend="nss"/>. Additional upstream downloads
177 are available at the links included in
178 <filename>/etc/make-ca.conf.dist</filename>. Simply copy the file to
179 <filename>/etc/make-ca.conf</filename> and edit as appropriate.</para>
180
181 <indexterm zone="make-ca make-ca-config">
182 <primary sortas="e-etc-make-ca-conf">/etc/make-ca.conf</primary>
183 </indexterm>
184
185 <bridgehead renderas="sect3">About Trust Arguments</bridgehead>
186
187 <para>There are three trust types that are recognized by the
188 <application>make-ca</application> script, SSL/TLS, S/Mime, and code
189 signing. For <application>OpenSSL</application>, these are
190 <parameter>serverAuth</parameter>, <parameter>emailProtection</parameter>,
191 and <parameter>codeSigning</parameter> respectively. If one of the three
192 trust arguments is omitted, the certificate is neither trusted, nor
193 rejected for that role. Clients that use <application>OpenSSL</application>
194 or <application>NSS</application> encountering this certificate will
195 present a warning to the user. Clients using
196 <application>GnuTLS</application> without
197 <application>p11-kit</application> support are not aware of trusted
198 certificates. To include this CA into the
199 <filename>ca-bundle.crt</filename>,
200 <filename>email-ca-bundle.crt</filename>, or
201 <filename>objsign-ca-bundle.crt</filename> files
202 (the <application>GnuTLS</application> legacy bundles), it must have the
203 appropriate trust arguments.</para>
204
205 <bridgehead renderas="sect3">Adding Additional CA Certificates</bridgehead>
206
207 <para>The <filename class="directory">/etc/ssl/local</filename> directory
208 is available to add additional CA certificates to the system. For instance,
209 you might need to add an organization or government CA certificate.
210 Files in this directory must be in the <application>OpenSSL</application>
211 trusted certificate format. To create an <application>OpenSSL</application>
212 trusted certificate from a regular PEM encoded file, you need to add trust
213 arguments to the <command>openssl</command> command, and create a new
214 certificate. For example, using the
215 <ulink url="http://www.cacert.org/">CAcert</ulink> roots, if you want to
216 trust both for all three roles, the following commands will create
217 appropriate OpenSSL trusted certificates (run as the
218 <systemitem class="username">root</systemitem> user after
219 <xref linkend="wget"/> is installed):</para>
220
221<screen role="nodump"><userinput>wget http://www.cacert.org/certs/root.crt &amp;&amp;
222wget http://www.cacert.org/certs/class3.crt &amp;&amp;
223openssl x509 -in root.crt -text -fingerprint -setalias "CAcert Class 1 root" \
224 -addtrust serverAuth -addtrust emailProtection -addtrust codeSigning \
225 > /etc/ssl/local/CAcert_Class_1_root.pem &amp;&amp;
226openssl x509 -in class3.crt -text -fingerprint -setalias "CAcert Class 3 root" \
227 -addtrust serverAuth -addtrust emailProtection -addtrust codeSigning \
228 > /etc/ssl/local/CAcert_Class_3_root.pem &amp;&amp;
229/usr/sbin/make-ca -r -f</userinput></screen>
230
231 <bridgehead renderas="sect3">Overriding Mozilla Trust</bridgehead>
232
233 <para>Occasionally, there may be instances where you don't agree with
234 Mozilla's inclusion of a particular certificate authority. If you'd like
235 to override the default trust of a particular CA, simply create a copy of
236 the existing certificate in
237 <filename class="directory">/etc/ssl/local</filename> with different trust
238 arguments. For example, if you'd like to distrust the "Makebelieve_CA_Root"
239 file, run the following commands:</para>
240
241<screen role="nodump"><userinput>openssl x509 -in /etc/ssl/certs/Makebelieve_CA_Root.pem \
242 -text \
243 -fingerprint \
244 -setalias "Disabled Makebelieve CA Root" \
245 -addreject serverAuth \
246 -addreject emailProtection \
247 -addreject codeSigning \
248 > /etc/ssl/local/Disabled_Makebelieve_CA_Root.pem &amp;&amp;
249/usr/sbin/make-ca -r -f</userinput></screen>
250
251 </sect2>
252
253 <sect2 role="content">
254 <title>Contents</title>
255
256 <segmentedlist>
257 <segtitle>Installed Programs</segtitle>
258 <segtitle>Installed Directories</segtitle>
259
260 <seglistitem>
261 <seg>make-ca</seg>
262 <seg>/etc/ssl/{certs,local} and
263 /etc/pki/{nssdb,anchors,tls/{certs,java}}</seg>
264 </seglistitem>
265 </segmentedlist>
266
267 <variablelist>
268 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
269 <?dbfo list-presentation="list"?>
270 <?dbhtml list-presentation="table"?>
271
272 <varlistentry id="make-ca-bin">
273 <term><command>make-ca</command></term>
274 <listitem>
275 <para>is a shell script that adapts a current version of
276 <filename>certdata.txt</filename>, and prepares it for use
277 as the system trust store.</para>
278 <indexterm zone="make-ca make-ca">
279 <primary sortas="b-make-ca">make-ca</primary>
280 </indexterm>
281 </listitem>
282 </varlistentry>
283 </variablelist>
284
285 </sect2>
286</sect1>
Note: See TracBrowser for help on using the repository browser.