2011-10-20 04:18:40 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
2016-11-18 15:13:46 +08:00
|
|
|
<!ENTITY certhost "https://hg.mozilla.org/">
|
|
|
|
<!ENTITY certpath "/lib/ckfw/builtins/certdata.txt">
|
2018-02-25 07:05:35 +08:00
|
|
|
<!ENTITY make-ca-buildsize "6.6 MB (with all runtime deps)">
|
|
|
|
<!ENTITY make-ca-time "0.3 SBU (with all runtime deps)">
|
2016-11-18 15:13:46 +08:00
|
|
|
|
2017-10-07 11:31:58 +08:00
|
|
|
<!ENTITY make-ca-download "https://github.com/djlucas/make-ca/archive/v&make-ca-version;/make-ca-&make-ca-version;.tar.gz">
|
2017-10-16 09:42:33 +08:00
|
|
|
<!ENTITY make-ca-size "36 KB">
|
2018-05-22 10:03:23 +08:00
|
|
|
<!ENTITY make-ca-md5sum "1f0176c4fa89274971b2826a97f303f7">
|
2011-10-20 04:18:40 +08:00
|
|
|
]>
|
|
|
|
|
2018-03-01 00:11:20 +08:00
|
|
|
<sect1 id="make-ca" xreflabel="make-ca-&make-ca-version;">
|
2018-02-25 07:05:35 +08:00
|
|
|
<?dbhtml filename="make-ca.html"?>
|
2011-10-20 04:18:40 +08:00
|
|
|
|
|
|
|
<sect1info>
|
|
|
|
<othername>$LastChangedBy$</othername>
|
|
|
|
<date>$Date$</date>
|
|
|
|
</sect1info>
|
|
|
|
|
2018-03-01 00:11:20 +08:00
|
|
|
<title>make-ca-&make-ca-version;</title>
|
2018-02-25 07:05:35 +08:00
|
|
|
<indexterm zone="make-ca">
|
|
|
|
<primary sortas="a-make-ca">make-ca</primary>
|
2011-10-20 04:18:40 +08:00
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
2018-02-25 07:05:35 +08:00
|
|
|
<title>Introduction to make-ca</title>
|
2011-10-20 04:18:40 +08:00
|
|
|
|
2018-03-01 00:11:20 +08:00
|
|
|
<para>
|
|
|
|
Public Key Infrastructure (PKI) is a method to validate the authenticity
|
|
|
|
of an otherwise unknown entity across untrusted networks. PKI works by
|
|
|
|
establishing a chain of trust, rather than trusting each individual host
|
|
|
|
or entity explicitly. In order for a certificate presented by a remote
|
|
|
|
entity to be trusted, that certificate must present a complete chain of
|
|
|
|
certificates that can be validated using the root certificate of a
|
|
|
|
Certificate Authority (CA) that is trusted by the local machine.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Establishing trust with a CA involves validating things like company
|
|
|
|
address, ownership, contact information, etc., and ensuring that the CA
|
|
|
|
has followed best practices, such as undergoing periodic security audits
|
|
|
|
by independent investigators and maintaining an always available
|
|
|
|
certificate revocation list. This is well outside the scope of BLFS (as
|
|
|
|
it is for most Linux distributions). The certificate store provided here
|
|
|
|
is taken from the Mozilla Foundation, who have established very strict
|
|
|
|
inclusion policies described <ulink
|
|
|
|
url="https://www.mozilla.org/en-US/about/governance/policies/security-group/certs/">here</ulink>.
|
|
|
|
</para>
|
|
|
|
|
2018-08-15 10:39:38 +08:00
|
|
|
&lfs83_checked;
|
2018-03-01 00:11:20 +08:00
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
2011-10-20 04:18:40 +08:00
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
2016-10-29 17:56:12 +08:00
|
|
|
<para>Download (HTTP): <ulink url="&make-ca-download;"/></para>
|
2011-10-20 04:18:40 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2016-10-29 17:56:12 +08:00
|
|
|
<para>Download size: &make-ca-size;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download MD5 Sum: &make-ca-md5sum;</para>
|
2011-10-20 04:18:40 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2018-02-25 07:05:35 +08:00
|
|
|
<para>Estimated disk space required: &make-ca-buildsize;</para>
|
2011-10-20 04:18:40 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2018-02-25 07:05:35 +08:00
|
|
|
<para>Estimated build time: &make-ca-time;</para>
|
2011-10-20 04:18:40 +08:00
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
2018-02-25 07:05:35 +08:00
|
|
|
<bridgehead renderas="sect3">make-ca Dependencies</bridgehead>
|
2018-02-12 01:41:19 +08:00
|
|
|
<!--
|
2011-10-20 04:18:40 +08:00
|
|
|
<bridgehead renderas="sect4">Required</bridgehead>
|
2016-11-18 15:13:46 +08:00
|
|
|
<para role="required"><xref linkend="openssl"/></para>
|
2018-02-12 01:41:19 +08:00
|
|
|
-->
|
2016-11-18 15:13:46 +08:00
|
|
|
<bridgehead renderas="sect4">Optional (runtime)</bridgehead>
|
|
|
|
<para role="optional">
|
2017-09-16 04:50:02 +08:00
|
|
|
<xref role="runtime" linkend="java"/> or
|
|
|
|
<xref role="runtime" linkend="openjdk"/>,
|
|
|
|
<xref role="runtime" linkend="nss"/>, and
|
|
|
|
<xref role="runtime" linkend="p11-kit"/>
|
|
|
|
</para>
|
2011-10-20 04:18:40 +08:00
|
|
|
|
|
|
|
<para condition="html" role="usernotes">User Notes:
|
2018-02-25 07:05:35 +08:00
|
|
|
<ulink url='&blfs-wiki;/make-ca'/></para>
|
2011-10-20 04:18:40 +08:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
2018-02-25 07:05:35 +08:00
|
|
|
<title>Installation of make-ca</title>
|
2011-10-20 04:18:40 +08:00
|
|
|
|
2017-10-07 11:31:58 +08:00
|
|
|
<para>The <application>make-ca</application> script will download and
|
|
|
|
process the certificates included in the <filename>certdata.txt</filename>
|
|
|
|
file for use in multiple certificate stores (if the associated applications
|
|
|
|
are present on the system). Additionally, any local certificates stored in
|
2016-11-22 13:41:16 +08:00
|
|
|
<filename>/etc/ssl/local</filename> will be imported to the certificate
|
2016-11-18 15:13:46 +08:00
|
|
|
stores. Certificates in this directory should be stored as PEM encoded
|
|
|
|
<application>OpenSSL</application> trusted certificates.</para>
|
|
|
|
|
|
|
|
<para>To create an <application>OpenSSL</application> trusted certificate
|
2017-10-07 11:31:58 +08:00
|
|
|
from a regular PEM encoded file, you need to add trust arguments to the
|
2016-11-18 15:13:46 +08:00
|
|
|
<command>openssl</command> command, and create a new certificate. There are
|
2017-05-19 14:02:20 +08:00
|
|
|
three trust types that are recognized by the
|
2017-10-07 11:31:58 +08:00
|
|
|
<application>make-ca</application> script, SSL/TLS, S/Mime, and code
|
2017-05-19 14:02:20 +08:00
|
|
|
signing. For example, using the
|
2017-10-07 11:31:58 +08:00
|
|
|
<ulink url="http://www.cacert.org/">CAcert</ulink> roots, if you want to
|
|
|
|
trust both for all three roles, the following commands will create
|
2018-01-30 05:12:53 +08:00
|
|
|
appropriate OpenSSL trusted certificates (run as the <systemitem
|
|
|
|
class="username">root</systemitem> user):</para>
|
2017-05-19 14:02:20 +08:00
|
|
|
|
2018-01-30 05:12:53 +08:00
|
|
|
<screen role="nodump"><userinput>install -vdm755 /etc/ssl/local &&
|
2017-05-19 14:02:20 +08:00
|
|
|
wget http://www.cacert.org/certs/root.crt &&
|
2017-10-07 11:31:58 +08:00
|
|
|
wget http://www.cacert.org/certs/class3.crt &&
|
2017-05-19 14:02:20 +08:00
|
|
|
openssl x509 -in root.crt -text -fingerprint -setalias "CAcert Class 1 root" \
|
|
|
|
-addtrust serverAuth -addtrust emailProtection -addtrust codeSigning \
|
2017-10-07 11:31:58 +08:00
|
|
|
> /etc/ssl/local/CAcert_Class_1_root.pem &&
|
|
|
|
openssl x509 -in class3.crt -text -fingerprint -setalias "CAcert Class 3 root" \
|
|
|
|
-addtrust serverAuth -addtrust emailProtection -addtrust codeSigning \
|
|
|
|
> /etc/ssl/local/CAcert_Class_3_root.pem</userinput></screen>
|
2017-05-19 14:02:20 +08:00
|
|
|
|
|
|
|
<para>If one of the three trust arguments is omitted, the certificate is
|
|
|
|
neither trusted, nor rejected for that role. Clients that use
|
|
|
|
<application>OpenSSL</application> or <application>NSS</application>
|
|
|
|
encountering this certificate will present a warning to the user. Clients
|
|
|
|
using <application>GnuTLS</application> without
|
|
|
|
<application>p11-kit</application> support are not aware of trusted
|
2016-11-18 15:13:46 +08:00
|
|
|
certificates. To include this CA into the ca-bundle.crt (used for
|
2016-11-25 00:05:14 +08:00
|
|
|
<application>GnuTLS</application>), it must have <envar>serverAuth</envar>
|
2017-05-19 14:02:20 +08:00
|
|
|
trust. Additionally, to explicitly disallow a certificate for a particular
|
|
|
|
use, replace the <parameter>-addtrust</parameter> flag with the
|
|
|
|
<parameter>-addreject</parameter> flag.</para>
|
2016-11-18 15:13:46 +08:00
|
|
|
|
|
|
|
<para>To install the various certificate stores, first install the
|
2017-10-07 11:31:58 +08:00
|
|
|
<application>make-ca</application> script into the correct location.
|
2016-11-18 15:13:46 +08:00
|
|
|
As the <systemitem class="username">root</systemitem> user:</para>
|
|
|
|
|
2017-10-07 11:31:58 +08:00
|
|
|
<screen role="root"><userinput>make install</userinput></screen>
|
2016-11-18 15:13:46 +08:00
|
|
|
|
2017-10-07 11:31:58 +08:00
|
|
|
<para>As the <systemitem class="username">root</systemitem> user, download
|
|
|
|
and update the certificate stores with the following command:</para>
|
2016-11-18 15:13:46 +08:00
|
|
|
|
2017-08-31 07:58:57 +08:00
|
|
|
<note>
|
|
|
|
<para>If running the script a second time with the same version of
|
|
|
|
<filename>certdata.txt</filename>, for instance, to add additional stores
|
|
|
|
as the requisite software is installed, add the <parameter>-f</parameter>
|
2017-10-07 11:31:58 +08:00
|
|
|
switch to the command line. If packaging, run <command>make-ca
|
2017-08-31 07:58:57 +08:00
|
|
|
--help</command> to see all available command line options.</para>
|
|
|
|
</note>
|
|
|
|
|
2018-05-22 10:03:23 +08:00
|
|
|
<screen role="root"><userinput>/usr/sbin/make-ca -g</userinput></screen>
|
2016-11-18 15:13:46 +08:00
|
|
|
|
2017-10-07 11:31:58 +08:00
|
|
|
<para>You should periodically update the store with the above command
|
|
|
|
either manually, or via a <phrase revision="sysv">cron job.</phrase>
|
|
|
|
<phrase revision="systemd">systemd timer. A timer is installed at
|
|
|
|
<filename>/etc/systemd/system/update-pki.timer</filename> that, if enabled,
|
|
|
|
will check for updates weekly.</phrase></para>
|
2016-11-18 15:13:46 +08:00
|
|
|
|
2017-10-07 11:31:58 +08:00
|
|
|
<para>The default <filename>certdata.txt</filename> file provided by make-ca
|
|
|
|
is obtained from the mozilla-release branch, and is modified to provide a
|
|
|
|
Mercurial revision. This will be the correct version for most
|
2016-11-18 15:13:46 +08:00
|
|
|
systems. There are, however, several other variants of the file available
|
2016-11-26 18:29:24 +08:00
|
|
|
for use that might be preferred for one reason or another, including the
|
|
|
|
files shipped with Mozilla products in this book. RedHat and OpenSUSE,
|
|
|
|
for instance, use the version included in <xref linkend="nss"/>. Additional
|
|
|
|
upstream downloads are available at the links below.</para>
|
2016-11-18 15:13:46 +08:00
|
|
|
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>Mozilla Release (the version provided by BLFS):
|
|
|
|
<ulink url="&certhost;releases/mozilla-release/raw-file/default/security/nss&certpath;"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2016-11-22 13:41:16 +08:00
|
|
|
<para>NSS (this is the latest available version):
|
2017-01-05 09:32:16 +08:00
|
|
|
<ulink url="&certhost;projects/nss/raw-file/tip&certpath;"/>
|
2016-11-18 15:13:46 +08:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Mozilla Central:
|
|
|
|
<ulink url="&certhost;mozilla-central/raw-file/default/security/nss&certpath;"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Mozilla Beta:
|
|
|
|
<ulink url="&certhost;releases/mozilla-beta/raw-file/default/security/nss&certpath;"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Mozilla Aurora:
|
|
|
|
<ulink url="&certhost;releases/mozilla-aurora/raw-file/default/security/nss&certpath;"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
2013-09-12 01:21:08 +08:00
|
|
|
|
2011-10-20 04:18:40 +08:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Programs</segtitle>
|
|
|
|
<segtitle>Installed Libraries</segtitle>
|
|
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
2017-10-07 11:31:58 +08:00
|
|
|
<seg>make-ca</seg>
|
2011-10-20 04:18:40 +08:00
|
|
|
<seg>None</seg>
|
2016-11-18 15:13:46 +08:00
|
|
|
<seg>/etc/ssl/{certs,java,local} and /etc/pki/{nssdb,anchors}</seg>
|
2011-10-20 04:18:40 +08:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
2018-02-25 07:05:35 +08:00
|
|
|
<varlistentry id="make-ca-bin">
|
2017-10-07 11:31:58 +08:00
|
|
|
<term><command>make-ca</command></term>
|
2011-10-20 04:18:40 +08:00
|
|
|
<listitem>
|
2016-11-18 15:13:46 +08:00
|
|
|
<para>is a shell script that adapts a current version of
|
2016-10-29 17:56:12 +08:00
|
|
|
<filename>certdata.txt</filename>, and prepares it for use
|
|
|
|
as the system certificate store.</para>
|
2018-02-25 07:05:35 +08:00
|
|
|
<indexterm zone="make-ca make-ca">
|
2011-10-20 04:18:40 +08:00
|
|
|
<primary sortas="b-make-ca">make-ca</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|