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.
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 here.
This package is known to build and work properly using an LFS-8.3 platform.
Download (HTTP): https://github.com/djlucas/make-ca/archive/v0.8/make-ca-0.8.tar.gz
Download size: 36 KB
Download MD5 Sum: 1f0176c4fa89274971b2826a97f303f7
Estimated disk space required: 6.6 MB (with all runtime deps)
Estimated build time: 0.3 SBU (with all runtime deps)
Java-10.0.2 or OpenJDK-10.0.2, NSS-3.38, and p11-kit-0.23.13
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/make-ca
The make-ca script will download
and process the certificates included in the certdata.txt
file for use in multiple certificate
stores (if the associated applications are present on the system).
Additionally, any local certificates stored in /etc/ssl/local
will be imported to the
certificate stores. Certificates in this directory should be stored
as PEM encoded OpenSSL trusted
certificates.
To create an OpenSSL trusted
certificate from a regular PEM encoded file, you need to add trust
arguments to the openssl command, and create a new
certificate. There are three trust types that are recognized by the
make-ca script, SSL/TLS, S/Mime,
and code signing. For example, using the CAcert roots, if you want to trust
both for all three roles, the following commands will create
appropriate OpenSSL trusted certificates (run as the root
user):
install -vdm755 /etc/ssl/local && wget http://www.cacert.org/certs/root.crt && wget http://www.cacert.org/certs/class3.crt && openssl x509 -in root.crt -text -fingerprint -setalias "CAcert Class 1 root" \ -addtrust serverAuth -addtrust emailProtection -addtrust codeSigning \ > /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
If one of the three trust arguments is omitted, the certificate is
neither trusted, nor rejected for that role. Clients that use
OpenSSL or NSS encountering this certificate will present
a warning to the user. Clients using GnuTLS without p11-kit support are not aware of trusted
certificates. To include this CA into the ca-bundle.crt (used for
GnuTLS), it must have serverAuth
trust. Additionally, to explicitly
disallow a certificate for a particular use, replace the -addtrust
flag with the -addreject
flag.
To install the various certificate stores, first install the
make-ca script into the correct
location. As the root
user:
make install
As the root
user, download and
update the certificate stores with the following command:
If running the script a second time with the same version of
certdata.txt
, for instance, to add
additional stores as the requisite software is installed, add the
-f
switch to the command
line. If packaging, run make-ca
--help to see all available command line options.
/usr/sbin/make-ca -g
You should periodically update the store with the above command either manually, or via a cron job.
The default certdata.txt
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 systems. There are, however, several other
variants of the file available 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 NSS-3.38. Additional upstream downloads are
available at the links below.
Mozilla Release (the version provided by BLFS): https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
NSS (this is the latest available version): https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/builtins/certdata.txt
Mozilla Central: https://hg.mozilla.org/mozilla-central/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
Mozilla Beta: https://hg.mozilla.org/releases/mozilla-beta/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
Mozilla Aurora: https://hg.mozilla.org/releases/mozilla-aurora/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
Last updated on 2018-08-14 19:39:38 -0700