[c9b953e6] | 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 |
|
---|
[4a16903] | 7 | <!ENTITY certhost "https://hg.mozilla.org/">
|
---|
| 8 | <!ENTITY certpath "/lib/ckfw/builtins/certdata.txt">
|
---|
| 9 | <!ENTITY ca-bundle-download "&sources-anduin-http;/other/certdata.txt">
|
---|
| 10 | <!ENTITY ca-bundle-size "1.6 MB">
|
---|
| 11 | <!ENTITY cacerts-buildsize "4.7 MB (with all runtime deps)">
|
---|
| 12 | <!ENTITY cacerts-time "0.2 SBU (with all runtime deps)">
|
---|
| 13 |
|
---|
[e6af89ca] | 14 | <!ENTITY make-ca-download "&sources-anduin-http;/other/make-ca.sh-&make-ca-version;">
|
---|
[4a16903] | 15 | <!ENTITY make-ca-size "11 KB">
|
---|
[87c38e8] | 16 | <!ENTITY make-ca-md5sum "cce9fa4713c4611d9e61f99de612a1e9">
|
---|
[c9b953e6] | 17 | ]>
|
---|
| 18 |
|
---|
| 19 | <sect1 id="cacerts" xreflabel="Certificate Authority Certificates">
|
---|
| 20 | <?dbhtml filename="cacerts.html"?>
|
---|
| 21 |
|
---|
| 22 | <sect1info>
|
---|
| 23 | <othername>$LastChangedBy$</othername>
|
---|
| 24 | <date>$Date$</date>
|
---|
| 25 | </sect1info>
|
---|
| 26 |
|
---|
| 27 | <title>Certificate Authority Certificates</title>
|
---|
| 28 |
|
---|
[4a16903] | 29 | <para>Public Key Infrastructure (PKI) is a method to validate the
|
---|
[45db70f] | 30 | authenticity of an otherwise unknown entity across untrusted networks. PKI
|
---|
[4a16903] | 31 | works by establishing a chain of trust, rather than trusting each individual
|
---|
| 32 | host or entity explicitly. In order for a certificate presented by a remote
|
---|
[45db70f] | 33 | entity to be trusted, that certificate must present a complete chain of
|
---|
[4a16903] | 34 | certificates that can be validated using the root certificate of a
|
---|
| 35 | Certificate Authority (CA) that is trusted by the local machine.</para>
|
---|
| 36 |
|
---|
| 37 | <para>Establishing trust with a CA involves validating things like company
|
---|
| 38 | address, ownership, contact information, etc., and ensuring that the CA has
|
---|
[da0166b2] | 39 | followed best practices, such as undergoing periodic security audits by
|
---|
| 40 | independent investigators and maintaining an always available certificate
|
---|
[4a16903] | 41 | revocation list. This is well outside the scope of BLFS (as it is for most
|
---|
| 42 | Linux distributions). The certificate store provided here is taken from the
|
---|
| 43 | Mozilla Foundation, who have established very strict inclusion policies
|
---|
| 44 | described
|
---|
| 45 | <ulink url="https://www.mozilla.org/en-US/about/governance/policies/security-group/certs/">here</ulink>.</para>
|
---|
[c9b953e6] | 46 |
|
---|
[7fd2c27] | 47 | &lfs80_checked;
|
---|
[c9b953e6] | 48 |
|
---|
| 49 | <indexterm zone="cacerts">
|
---|
| 50 | <primary sortas="a-cacerts">Certificate Authority Certificates</primary>
|
---|
| 51 | </indexterm>
|
---|
| 52 |
|
---|
| 53 | <sect2 role="package">
|
---|
| 54 | <title>Introduction to Certificate Authorities</title>
|
---|
| 55 |
|
---|
| 56 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 57 | <itemizedlist spacing="compact">
|
---|
| 58 | <listitem>
|
---|
[30b7db74] | 59 | <para>Download (HTTP): <ulink url="&make-ca-download;"/></para>
|
---|
[c9b953e6] | 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
[30b7db74] | 62 | <para>Download size: &make-ca-size;</para>
|
---|
| 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
| 65 | <para>Download MD5 Sum: &make-ca-md5sum;</para>
|
---|
[c9b953e6] | 66 | </listitem>
|
---|
| 67 | <listitem>
|
---|
| 68 | <para>Estimated disk space required: &cacerts-buildsize;</para>
|
---|
| 69 | </listitem>
|
---|
| 70 | <listitem>
|
---|
| 71 | <para>Estimated build time: &cacerts-time;</para>
|
---|
| 72 | </listitem>
|
---|
| 73 | </itemizedlist>
|
---|
| 74 |
|
---|
[4a16903] | 75 |
|
---|
| 76 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 77 | <itemizedlist spacing="compact">
|
---|
| 78 | <listitem>
|
---|
| 79 | <para>
|
---|
| 80 | CA Certificates
|
---|
| 81 | <ulink url="&ca-bundle-download;"/>
|
---|
| 82 | </para>
|
---|
| 83 | </listitem>
|
---|
| 84 | </itemizedlist>
|
---|
| 85 |
|
---|
[c9b953e6] | 86 | <bridgehead renderas="sect3">Certificate Authority Certificates Dependencies</bridgehead>
|
---|
| 87 |
|
---|
| 88 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[4a16903] | 89 | <para role="required"><xref linkend="openssl"/></para>
|
---|
| 90 |
|
---|
| 91 | <bridgehead renderas="sect4">Optional (runtime)</bridgehead>
|
---|
| 92 | <para role="optional">
|
---|
| 93 | <xref linkend="java"/> or <xref linkend="openjdk"/>, and
|
---|
| 94 | <xref linkend="nss"/></para>
|
---|
[c9b953e6] | 95 |
|
---|
| 96 | <para condition="html" role="usernotes">User Notes:
|
---|
| 97 | <ulink url='&blfs-wiki;/cacerts'/></para>
|
---|
| 98 | </sect2>
|
---|
| 99 |
|
---|
| 100 | <sect2 role="installation">
|
---|
| 101 | <title>Installation of Certificate Authority Certificates</title>
|
---|
| 102 |
|
---|
[e6af89ca] | 103 | <para>The <application>make-ca.sh</application> script will process the
|
---|
[4a16903] | 104 | certificates included in the <filename>certdata.txt</filename> file
|
---|
| 105 | for use in multiple certificate stores (if the associated applications are
|
---|
| 106 | present on the system). Additionally, any local certificates stored in
|
---|
[da0166b2] | 107 | <filename>/etc/ssl/local</filename> will be imported to the certificate
|
---|
[4a16903] | 108 | stores. Certificates in this directory should be stored as PEM encoded
|
---|
| 109 | <application>OpenSSL</application> trusted certificates.</para>
|
---|
| 110 |
|
---|
| 111 | <para>To create an <application>OpenSSL</application> trusted certificate
|
---|
| 112 | from a regular PEM encoded file, provided by a CA not included in Mozilla's
|
---|
| 113 | certificate distribution, you need to add trust arguments to the
|
---|
| 114 | <command>openssl</command> command, and create a new certificate. There are
|
---|
| 115 | three trust types that are recognised by the
|
---|
| 116 | <application>make-ca.sh</application> script, SSL/TLS, S/Mime, and code
|
---|
| 117 | signing. For example, to allow a certificate to be trusted for both
|
---|
| 118 | SSL/TLS and S/Mime, but explicitly rejected for code signing, you could use
|
---|
[45db70f] | 119 | the following commands to create a new trusted certificate that has those
|
---|
[4a16903] | 120 | trust attributes:</para>
|
---|
| 121 |
|
---|
| 122 | <screen><literal>openssl x509 -in MyRootCA.pem -text -fingerprint -setalias "My Root CA 1" \
|
---|
| 123 | -addtrust serverAuth -addtrust emailProtection -addreject codeSigning \
|
---|
| 124 | > MyRootCA-trusted.pem</literal></screen>
|
---|
| 125 |
|
---|
| 126 | <para>If a trust argument is omitted, the certificate is neither trusted,
|
---|
| 127 | nor rejected. Clients that use <application>OpenSSL</application> or
|
---|
| 128 | <application>NSS</application> encountering this certificate will present
|
---|
| 129 | a warning to the user. Clients using <application>GnuTLS</application>
|
---|
| 130 | without <application>p11-kit</application> support are not aware of trusted
|
---|
| 131 | certificates. To include this CA into the ca-bundle.crt (used for
|
---|
[45db70f] | 132 | <application>GnuTLS</application>), it must have <envar>serverAuth</envar>
|
---|
[c633dac] | 133 | trust.</para>
|
---|
[4a16903] | 134 |
|
---|
| 135 | <para>To install the various certificate stores, first install the
|
---|
| 136 | <application>make-ca.sh</application> script into the correct location.
|
---|
| 137 | As the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 138 |
|
---|
[e6af89ca] | 139 | <screen role="root"><userinput>install -vm755 make-ca.sh-&make-ca-version; /usr/sbin/make-ca.sh</userinput></screen>
|
---|
[4a16903] | 140 |
|
---|
| 141 | <para>As the <systemitem class="username">root</systemitem> user, make sure
|
---|
[da0166b2] | 142 | that certdata.txt is in the current directory, and update the certificate
|
---|
[4a16903] | 143 | stores with the following command:</para>
|
---|
| 144 |
|
---|
| 145 | <screen role="root"><userinput>/usr/sbin/make-ca.sh</userinput></screen>
|
---|
| 146 |
|
---|
| 147 | <para>You should periodically download a copy of
|
---|
| 148 | <filename>certdata.txt</filename> and run the
|
---|
| 149 | <application>make-ca.sh</application> script (as the
|
---|
| 150 | <systemitem class="username">root</systemitem> user), or as part of a
|
---|
| 151 | monthly <application>cron</application> job to ensure that you have the
|
---|
| 152 | latest available version of the certificates.</para>
|
---|
| 153 |
|
---|
[e6af89ca] | 154 | <note>
|
---|
| 155 | <para>If running the script a second time with the same version of
|
---|
| 156 | <filename>certdata.txt</filename>, for instance, to add additional stores
|
---|
| 157 | as the requisite software is installed, add the <parameter>-f</parameter>
|
---|
| 158 | switch to the command line. If packaging, run <command>make-ca.sh
|
---|
| 159 | --help</command> to see all available command line options.</para>
|
---|
| 160 | </note>
|
---|
| 161 |
|
---|
[4a16903] | 162 | <para>The <filename>certdata.txt</filename> file provided by BLFS is
|
---|
| 163 | obtained from the mozilla-release branch, and is modified to provide a
|
---|
[da0166b2] | 164 | simple dated revision. This will be the correct version for most
|
---|
[4a16903] | 165 | systems. There are, however, several other variants of the file available
|
---|
[e6af89ca] | 166 | for use that might be preferred for one reason or another, including the
|
---|
| 167 | files shipped with Mozilla products in this book. RedHat and OpenSUSE,
|
---|
| 168 | for instance, use the version included in <xref linkend="nss"/>. Additional
|
---|
| 169 | upstream downloads are available at the links below.</para>
|
---|
[4a16903] | 170 |
|
---|
| 171 | <itemizedlist spacing="compact">
|
---|
| 172 | <listitem>
|
---|
| 173 | <para>Mozilla Release (the version provided by BLFS):
|
---|
| 174 | <ulink url="&certhost;releases/mozilla-release/raw-file/default/security/nss&certpath;"/>
|
---|
| 175 | </para>
|
---|
| 176 | </listitem>
|
---|
| 177 | <listitem>
|
---|
[da0166b2] | 178 | <para>NSS (this is the latest available version):
|
---|
[a3e625dd] | 179 | <ulink url="&certhost;projects/nss/raw-file/tip&certpath;"/>
|
---|
[4a16903] | 180 | </para>
|
---|
| 181 | </listitem>
|
---|
| 182 | <listitem>
|
---|
| 183 | <para>Mozilla Central:
|
---|
| 184 | <ulink url="&certhost;mozilla-central/raw-file/default/security/nss&certpath;"/>
|
---|
| 185 | </para>
|
---|
| 186 | </listitem>
|
---|
| 187 | <listitem>
|
---|
| 188 | <para>Mozilla Beta:
|
---|
| 189 | <ulink url="&certhost;releases/mozilla-beta/raw-file/default/security/nss&certpath;"/>
|
---|
| 190 | </para>
|
---|
| 191 | </listitem>
|
---|
| 192 | <listitem>
|
---|
| 193 | <para>Mozilla Aurora:
|
---|
| 194 | <ulink url="&certhost;releases/mozilla-aurora/raw-file/default/security/nss&certpath;"/>
|
---|
| 195 | </para>
|
---|
| 196 | </listitem>
|
---|
| 197 | </itemizedlist>
|
---|
[8b9034a] | 198 |
|
---|
[c9b953e6] | 199 | </sect2>
|
---|
| 200 |
|
---|
| 201 | <sect2 role="content">
|
---|
| 202 | <title>Contents</title>
|
---|
| 203 |
|
---|
| 204 | <segmentedlist>
|
---|
| 205 | <segtitle>Installed Programs</segtitle>
|
---|
| 206 | <segtitle>Installed Libraries</segtitle>
|
---|
| 207 | <segtitle>Installed Directories</segtitle>
|
---|
| 208 |
|
---|
| 209 | <seglistitem>
|
---|
[30b7db74] | 210 | <seg>make-ca.sh</seg>
|
---|
[c9b953e6] | 211 | <seg>None</seg>
|
---|
[4a16903] | 212 | <seg>/etc/ssl/{certs,java,local} and /etc/pki/{nssdb,anchors}</seg>
|
---|
[c9b953e6] | 213 | </seglistitem>
|
---|
| 214 | </segmentedlist>
|
---|
| 215 |
|
---|
| 216 | <variablelist>
|
---|
| 217 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 218 | <?dbfo list-presentation="list"?>
|
---|
| 219 | <?dbhtml list-presentation="table"?>
|
---|
| 220 |
|
---|
| 221 | <varlistentry id="make-ca">
|
---|
| 222 | <term><command>make-ca.sh</command></term>
|
---|
| 223 | <listitem>
|
---|
[4a16903] | 224 | <para>is a shell script that adapts a current version of
|
---|
[30b7db74] | 225 | <filename>certdata.txt</filename>, and prepares it for use
|
---|
| 226 | as the system certificate store.</para>
|
---|
[c9b953e6] | 227 | <indexterm zone="cacerts make-ca">
|
---|
| 228 | <primary sortas="b-make-ca">make-ca</primary>
|
---|
| 229 | </indexterm>
|
---|
| 230 | </listitem>
|
---|
| 231 | </varlistentry>
|
---|
| 232 | </variablelist>
|
---|
| 233 |
|
---|
| 234 | </sect2>
|
---|
| 235 | </sect1>
|
---|