source: postlfs/security/make-ca.xml@ 954be3a

perl-modules
Last change on this file since 954be3a was 954be3a, checked in by Ken Moffat <ken@…>, 5 years ago

perl modules branch: merge trunk r20657:20669

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/perl-modules@20670 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 10.6 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/archive/v&make-ca-version;/make-ca-&make-ca-version;.tar.gz">
13 <!ENTITY make-ca-size "36 KB">
14 <!ENTITY make-ca-md5sum "0eeaf712eedeae4fa55d8bfa37f4ca32">
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 &lfs83_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 trust).
106 Certificates in this directory should be stored as PEM encoded
107 <application>OpenSSL</application> trusted certificates.</para>
108
109 <para>To create an <application>OpenSSL</application> trusted certificate
110 from a regular PEM encoded file, you need to add trust arguments to the
111 <command>openssl</command> command, and create a new certificate. There are
112 three trust types that are recognized by the
113 <application>make-ca</application> script, SSL/TLS, S/Mime, and code
114 signing. For example, using the
115 <ulink url="http://www.cacert.org/">CAcert</ulink> roots, if you want to
116 trust both for all three roles, the following commands will create
117 appropriate OpenSSL trusted certificates (run as the <systemitem
118 class="username">root</systemitem> user):</para>
119
120<screen role="nodump"><userinput>install -vdm755 /etc/ssl/local &amp;&amp;
121wget http://www.cacert.org/certs/root.crt &amp;&amp;
122wget http://www.cacert.org/certs/class3.crt &amp;&amp;
123openssl x509 -in root.crt -text -fingerprint -setalias "CAcert Class 1 root" \
124 -addtrust serverAuth -addtrust emailProtection -addtrust codeSigning \
125 > /etc/ssl/local/CAcert_Class_1_root.pem &amp;&amp;
126openssl x509 -in class3.crt -text -fingerprint -setalias "CAcert Class 3 root" \
127 -addtrust serverAuth -addtrust emailProtection -addtrust codeSigning \
128 > /etc/ssl/local/CAcert_Class_3_root.pem</userinput></screen>
129
130 <para>If one of the three trust arguments is omitted, the certificate is
131 neither trusted, nor rejected for that role. Clients that use
132 <application>OpenSSL</application> or <application>NSS</application>
133 encountering this certificate will present a warning to the user. Clients
134 using <application>GnuTLS</application> without
135 <application>p11-kit</application> support are not aware of trusted
136 certificates. To include this CA into the ca-bundle.crt (used for
137 <application>GnuTLS</application>), it must have <envar>serverAuth</envar>
138 trust. Additionally, to explicitly disallow a certificate for a particular
139 use, replace the <parameter>-addtrust</parameter> flag with the
140 <parameter>-addreject</parameter> flag.</para>
141
142 <para>To install the various certificate stores, first install the
143 <application>make-ca</application> script into the correct location.
144 As the <systemitem class="username">root</systemitem> user:</para>
145
146<screen role="root"><userinput>make install &amp;&amp;
147mkdir -pv /etc/pki/tls/certs &amp;&amp;
148ln -svf /etc/ssl/ca-bundle.crt \
149 /etc/pki/tls/certs/ca-bundle.crt</userinput></screen>
150
151 <para>As the <systemitem class="username">root</systemitem> user, after
152 installing <xref linkend="p11-kit"/>, download the certificate source and
153 prepare for system use with the following command:</para>
154
155 <note>
156 <para>If running the script a second time with the same version of
157 <filename>certdata.txt</filename>, for instance, to add additional stores
158 as the requisite software is installed, add the <parameter>-r</parameter>
159 switch to the command line. If packaging, run <command>make-ca
160 --help</command> to see all available command line options.</para>
161 </note>
162
163<screen role="root"><userinput>/usr/sbin/make-ca -g</userinput></screen>
164
165 <para>You should periodically update the store with the above command
166 either manually, or via a <phrase revision="sysv">cron job.</phrase>
167 <phrase revision="systemd">systemd timer. A timer is installed at
168 <filename>/etc/systemd/system/update-pki.timer</filename> that, if enabled,
169 will check for updates weekly.</phrase></para>
170
171 <para>The default <filename>certdata.txt</filename> file provided by make-ca
172 is obtained from the mozilla-release branch, and is modified to provide a
173 Mercurial revision. This will be the correct version for most
174 systems. There are, however, several other variants of the file available
175 for use that might be preferred for one reason or another, including the
176 files shipped with Mozilla products in this book. RedHat and OpenSUSE,
177 for instance, use the version included in <xref linkend="nss"/>. Additional
178 upstream downloads are available at the links below.</para>
179
180 <itemizedlist spacing="compact">
181 <listitem>
182 <para>Mozilla Release (the version provided by BLFS):
183 <ulink url="&certhost;releases/mozilla-release/raw-file/default/security/nss&certpath;"/>
184 </para>
185 </listitem>
186 <listitem>
187 <para>NSS (this is the latest available version):
188 <ulink url="&certhost;projects/nss/raw-file/tip&certpath;"/>
189 </para>
190 </listitem>
191 <listitem>
192 <para>Mozilla Central:
193 <ulink url="&certhost;mozilla-central/raw-file/default/security/nss&certpath;"/>
194 </para>
195 </listitem>
196 <listitem>
197 <para>Mozilla Beta:
198 <ulink url="&certhost;releases/mozilla-beta/raw-file/default/security/nss&certpath;"/>
199 </para>
200 </listitem>
201 <listitem>
202 <para>Mozilla Aurora:
203 <ulink url="&certhost;releases/mozilla-aurora/raw-file/default/security/nss&certpath;"/>
204 </para>
205 </listitem>
206 </itemizedlist>
207
208 </sect2>
209
210 <sect2 role="content">
211 <title>Contents</title>
212
213 <segmentedlist>
214 <segtitle>Installed Programs</segtitle>
215 <segtitle>Installed Libraries</segtitle>
216 <segtitle>Installed Directories</segtitle>
217
218 <seglistitem>
219 <seg>make-ca</seg>
220 <seg>None</seg>
221 <seg>/etc/ssl/{certs,java,local} and /etc/pki/{nssdb,anchors}</seg>
222 </seglistitem>
223 </segmentedlist>
224
225 <variablelist>
226 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
227 <?dbfo list-presentation="list"?>
228 <?dbhtml list-presentation="table"?>
229
230 <varlistentry id="make-ca-bin">
231 <term><command>make-ca</command></term>
232 <listitem>
233 <para>is a shell script that adapts a current version of
234 <filename>certdata.txt</filename>, and prepares it for use
235 as the system trust store.</para>
236 <indexterm zone="make-ca make-ca">
237 <primary sortas="b-make-ca">make-ca</primary>
238 </indexterm>
239 </listitem>
240 </varlistentry>
241 </variablelist>
242
243 </sect2>
244</sect1>
Note: See TracBrowser for help on using the repository browser.