Kai Engert 9ac574b
////
Kai Engert 9ac574b
Copyright (C) 2013 Red Hat, Inc.
Kai Engert 9ac574b
Kai Engert 9ac574b
This program is free software; you can redistribute it and/or modify
Kai Engert 9ac574b
it under the terms of the GNU General Public License as published by
Kai Engert 9ac574b
the Free Software Foundation; either version 2 of the License, or
Kai Engert 9ac574b
(at your option) any later version.
Kai Engert 9ac574b
Kai Engert 9ac574b
This program is distributed in the hope that it will be useful,
Kai Engert 9ac574b
but WITHOUT ANY WARRANTY; without even the implied warranty of
Kai Engert 9ac574b
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Kai Engert 9ac574b
GNU General Public License for more details.
Kai Engert 9ac574b
////
Kai Engert 9ac574b
Kai Engert 9ac574b
Kai Engert 9ac574b
update-ca-trust(8)
Kai Engert 9ac574b
==================
Kai Engert 9ac574b
:doctype: manpage
Kai Engert 9ac574b
:man source: update-ca-trust
Kai Engert 9ac574b
Kai Engert 9ac574b
Kai Engert 9ac574b
NAME
Kai Engert 9ac574b
----
Kai Engert 9ac574b
update-ca-trust - manage consolidated and dynamic configuration of CA 
Kai Engert 9ac574b
certificates and associated trust
Kai Engert 9ac574b
Kai Engert 9ac574b
Kai Engert 9ac574b
SYNOPSIS
Kai Engert 9ac574b
--------
Kai Engert 9ac574b
*update-ca-trust* ['COMMAND']
Kai Engert 9ac574b
Kai Engert 9ac574b
Kai Engert 9ac574b
DESCRIPTION
Kai Engert 9ac574b
-----------
Kai Engert 9ac574b
update-ca-trust(8) is used to manage a consolidated and dynamic configuration 
Kai Engert ed9b40a
feature of Certificate Authority (CA) certificates and associated trust.
Kai Engert 9ac574b
Kai Engert ed9b40a
The feature is available for new applications that read the
Kai Engert 9ac574b
consolidated configuration files found in the /etc/pki/ca-trust/extracted directory
Kai Engert 9ac574b
or that load the PKCS#11 module p11-kit-trust.so
Kai Engert 9ac574b
Kai Engert 9ac574b
Parts of the new feature are also provided in a way to make it useful
Kai Engert ed9b40a
for legacy applications.
Kai Engert 9ac574b
Kai Engert 9ac574b
Many legacy applications expect CA certificates and trust configuration
Kai Engert 9ac574b
in a fixed location, contained in files with particular path and name,
Kai Engert ed9b40a
or by referring to a classic PKCS#11 trust module provided by the 
Kai Engert 9ac574b
NSS cryptographic library.
Kai Engert 9ac574b
Kai Engert ed9b40a
The dynamic configuration feature provides functionally compatible replacements 
Kai Engert ed9b40a
for classic configuration files and for the classic NSS trust module named libnssckbi.
Kai Engert ed9b40a
Kai Engert ed9b40a
In order to enable legacy applications, that read the classic files or 
Kai Engert ed9b40a
access the classic module, to make use of the new consolidated and dynamic configuration 
Kai Engert ed9b40a
feature, the classic filenames have been changed to symbolic links.
Kai Engert 9ac574b
The symbolic links refer to dynamically created and consolidated 
Kai Engert 9ac574b
output stored below the /etc/pki/ca-trust/extracted directory hierarchy.
Kai Engert 9ac574b
Kai Engert 9ac574b
The output is produced using the 'update-ca-trust' command (without parameters),
Kai Engert 9ac574b
or using the 'update-ca-trust extract' command.
Kai Engert 9ac574b
In order to produce the output, a flexible set of source configuration
Kai Engert 9ac574b
is read, as described in section <<sourceconf,SOURCE CONFIGURATION>>.
Kai Engert 9ac574b
Kai Engert ed9b40a
In addition, the classic PKCS#11 module 
Kai Engert ed9b40a
is replaced with a new PKCS#11 module (p11-kit-trust.so) that dynamically 
Kai Engert 9ac574b
reads the same source configuration.
Kai Engert 9ac574b
Kai Engert 9ac574b
Kai Engert 9ac574b
[[sourceconf]]
Kai Engert 9ac574b
SOURCE CONFIGURATION
Kai Engert 9ac574b
--------------------
Kai Engert 9ac574b
The dynamic configuration feature uses several source directories that
Kai Engert 9ac574b
will be scanned for any number of source files. *It is important to select 
Kai Engert 9ac574b
the correct subdirectory for adding files, as the subdirectory defines how 
Kai Engert 9ac574b
contained certificates will be trusted or distrusted, and which file formats are read.*
Kai Engert 9ac574b
Kai Engert 9ac574b
Files in *subdirectories below the directory hierarchy /usr/share/pki/ca-trust-source/* contain CA certificates and 
Kai Engert 9ac574b
trust settings in the PEM file format. The trust settings found here will be
Kai Engert 9ac574b
interpreted with a *low priority*.
Kai Engert 9ac574b
Kai Engert 9ac574b
Files in *subdirectories below the directory hierarchy /etc/pki/ca-trust/source/* contain CA certificates and 
Kai Engert 9ac574b
trust settings in the PEM file format. The trust settings found here will be
Kai Engert 9ac574b
interpreted with a *high priority*.
Kai Engert 9ac574b
Kai Engert 9ac574b
.You may use the following rules of thumb to decide, whether your configuration files should be added to the /etc or rather to the /usr directory hierarchy:
Kai Engert 9ac574b
* If you are manually adding a configuration file to a system, you probably 
Kai Engert 9ac574b
want it to override any other default configuration, and you most likely should
Kai Engert 9ac574b
add it to the respective subdirectory in the /etc hierarchy.
Kai Engert 9ac574b
* If you are creating a package that provides additional root CA certificates,
Kai Engert 9ac574b
that is intended for distribution to several computer systems, but you still
Kai Engert 9ac574b
want to allow the administrator to override your list, then your package should 
Kai Engert 9ac574b
add your files to the respective subdirectory in the /usr hierarchy.
Kai Engert 9ac574b
* If you are creating a package that is supposed to override the default system
Kai Engert 9ac574b
trust settings, that is intended for distribution to several computer systems, then your package should install the files to the respective
Kai Engert 9ac574b
subdirectory in the /etc hierarchy.
Kai Engert 9ac574b
Kai Engert 9ac574b
.*QUICK HELP 1*: To add a certificate in the simple PEM or DER file formats to the list of CAs trusted on the system:
Kai Engert 9ac574b
* add it as a new file to directory /etc/pki/ca-trust/source/anchors/
Kai Engert 9ac574b
* run 'update-ca-trust extract'
Kai Engert 9ac574b
Kai Engert 9ac574b
.*QUICK HELP 2*: If your certificate is in the extended BEGIN TRUSTED file format (which may contain distrust/blacklist trust flags, or trust flags for usages other than TLS) then:
Kai Engert 9ac574b
* add it as a new file to directory /etc/pki/ca-trust/source/
Kai Engert 9ac574b
* run 'update-ca-trust extract'
Kai Engert 9ac574b
Kai Engert 9ac574b
.In order to offer simplicity and flexibility, the way certificate files are treated depends on the subdirectory they are installed to.
Kai Engert 9ac574b
* simple trust anchors subdirectory: /usr/share/pki/ca-trust-source/anchors/ or /etc/pki/ca-trust/source/anchors/
Kai Engert 9ac574b
* simple blacklist (distrust) subdirectory: /usr/share/pki/ca-trust-source/blacklist/ or /etc/pki/ca-trust/source/blacklist/
Kai Engert 9ac574b
* extended format directory: /usr/share/pki/ca-trust-source/ or /etc/pki/ca-trust/source/
Kai Engert 9ac574b
Kai Engert 9ac574b
.In the main directories /usr/share/pki/ca-trust-source/ or /etc/pki/ca-trust/source/ you may install one or multiple files in the following file formats:
Kai Engert 9ac574b
* certificate files that include trust flags,
Kai Engert 9ac574b
  in the BEGIN/END TRUSTED CERTIFICATE file format
Kai Engert 9ac574b
  (any file name), which have been created using the openssl x509 tool
Kai Engert 9ac574b
  and the -addreject -addtrust options.
Kai Engert 9ac574b
  Bundle files with multiple certificates are supported.
Kai Engert 9ac574b
* files in the p11-kit file format using the .p11-kit file name
Kai Engert 9ac574b
  extension, which can (e.g.) be used to distrust certificates
Kai Engert 9ac574b
  based on serial number and issuer name, without having the
Kai Engert 9ac574b
  full certificate available.
Kai Engert 9ac574b
  (This is currently an undocumented format, to be extended later.
Kai Engert 9ac574b
   For examples of the supported formats, see the files
Kai Engert 9ac574b
   shipped with the ca-certificates package.)
Kai Engert 9ac574b
* certificate files without trust flags in either the DER file format or in
Kai Engert 9ac574b
  the PEM (BEGIN/END CERTIFICATE) file format (any file name). Such files 
Kai Engert 9ac574b
  will be added with neutral trust, neither trusted nor distrusted.
Kai Engert 9ac574b
  They will simply be known to the system, which might be helpful to
Kai Engert 9ac574b
  assist cryptographic software in constructing chains of certificates.
Kai Engert 9ac574b
  (If you want a CA certificate in these file formats to be trusted, you 
Kai Engert 9ac574b
   should remove it from this directory and move it to the 
Kai Engert 9ac574b
   ./anchors subdirectory instead.)
Kai Engert 9ac574b
Kai Engert 9ac574b
In the anchors subdirectories /usr/share/pki/ca-trust-source/anchors/ or /etc/pki/ca-trust/source/anchors/
Kai Engert 9ac574b
you may install one or multiple certificates in either the DER file
Kai Engert 9ac574b
format or in the PEM (BEGIN/END CERTIFICATE) file format.
Kai Engert 9ac574b
Each certificate will be treated as *trusted* for all purposes.
Kai Engert 9ac574b
Kai Engert 9ac574b
In the blacklist subdirectories /usr/share/pki/ca-trust-source/blacklist/ or /etc/pki/ca-trust/source/blacklist/
Kai Engert 9ac574b
you may install one or multiple certificates in either the DER file
Kai Engert 9ac574b
format or in the PEM (BEGIN/END CERTIFICATE) file format.
Kai Engert 9ac574b
Each certificate will be treated as *distrusted* for all purposes.
Kai Engert 9ac574b
Kai Engert 9ac574b
Please refer to the x509(1) manual page for the documentation of the 
Kai Engert 9ac574b
BEGIN/END CERTIFICATE and BEGIN/END TRUSTED CERTIFICATE file formats.
Kai Engert 9ac574b
Kai Engert 9ac574b
Applications that rely on a static file for a list of trusted CAs
Kai Engert 9ac574b
may load one of the files found in the /etc/pki/ca-trust/extracted
Kai Engert 9ac574b
directory. After modifying any file in the
Kai Engert 9ac574b
/usr/share/pki/ca-trust-source/ or /etc/pki/ca-trust/source/
Kai Engert 9ac574b
directories or in any of their subdirectories, or after adding a file, 
Kai Engert 9ac574b
it is necessary to run the 'update-ca-trust extract' command,
Kai Engert 9ac574b
in order to update the consolidated files in /etc/pki/ca-trust/extracted/ .
Kai Engert 9ac574b
Kai Engert ed9b40a
Applications that load the classic PKCS#11 module using filename libnssckbi.so 
Kai Engert 540618e
(which has been converted into a symbolic link pointing to the new module)
Kai Engert 540618e
and any application capable of 
Kai Engert 9ac574b
loading PKCS#11 modules and loading p11-kit-trust.so, will benefit from
Kai Engert 9ac574b
the dynamically merged set of certificates and trust information stored in the
Kai Engert 9ac574b
/usr/share/pki/ca-trust-source/ and /etc/pki/ca-trust/source/ directories.
Kai Engert 9ac574b
Kai Engert 9ac574b
Kai Engert 9ac574b
[[extractconf]]
Kai Engert 9ac574b
EXTRACTED CONFIGURATION
Kai Engert 9ac574b
-----------------------
Kai Engert 9ac574b
The directory /etc/pki/ca-trust/extracted/ contains generated CA certificate 
Kai Engert 9ac574b
bundle files which are created and updated, based on the <<sourceconf,SOURCE CONFIGURATION>> 
Kai Engert 9ac574b
by running the 'update-ca-trust extract' command.
Kai Engert 9ac574b
Kai Engert 9ac574b
If your application isn't able to load the PKCS#11 module p11-kit-trust.so,
Kai Engert 9ac574b
then you can use these files in your application to load a list of global
Kai Engert 9ac574b
root CA certificates.
Kai Engert 9ac574b
Kai Engert 9ac574b
Please never manually edit the files stored in this directory,
Kai Engert 9ac574b
because your changes will be lost and the files automatically overwritten,
Kai Engert 9ac574b
each time the 'update-ca-trust extract' command gets executed.
Kai Engert 9ac574b
Kai Engert 9ac574b
In order to install new trusted or distrusted certificates,
Kai Engert 9ac574b
please rather install them in the respective subdirectory below the
Kai Engert 9ac574b
/usr/share/pki/ca-trust-source/ or /etc/pki/ca-trust/source/
Kai Engert 9ac574b
directories, as described in the <<sourceconf,SOURCE CONFIGURATION>> section.
Kai Engert 9ac574b
Kai Engert 9ac574b
The directory /etc/pki/ca-trust/extracted/java/ contains 
Kai Engert 9ac574b
a CA certificate bundle in the java keystore file format.
Kai Engert 9ac574b
Distrust information cannot be represented in this file format,
Kai Engert 9ac574b
and distrusted certificates are missing from these files.
Kai Engert 9ac574b
File cacerts contains CA certificates trusted for TLS server authentication.
Kai Engert 9ac574b
Kai Engert 9ac574b
The directory /etc/pki/ca-trust/extracted/openssl/ contains 
Kai Engert 9ac574b
CA certificate bundle files in the extended BEGIN/END TRUSTED CERTIFICATE file format, 
Kai Engert 9ac574b
as described in the x509(1) manual page.
Kai Engert 9ac574b
File ca-bundle.trust.crt contains the full set of all trusted
Kai Engert 9ac574b
or distrusted certificates, including the associated trust flags.
Kai Engert 9ac574b
Kai Engert 9ac574b
The directory /etc/pki/ca-trust/extracted/pem/ contains 
Kai Engert 9ac574b
CA certificate bundle files in the simple BEGIN/END CERTIFICATE file format, 
Kai Engert 9ac574b
as decribed in the x509(1) manual page.
Kai Engert 9ac574b
Distrust information cannot be represented in this file format,
Kai Engert 9ac574b
and distrusted certificates are missing from these files.
Kai Engert 9ac574b
File tls-ca-bundle.pem contains CA certificates 
Kai Engert 9ac574b
trusted for TLS server authentication.
Kai Engert 9ac574b
File email-ca-bundle.pem contains CA certificates 
Kai Engert 9ac574b
trusted for E-Mail protection.
Kai Engert 9ac574b
File objsign-ca-bundle.pem contains CA certificates 
Kai Engert 9ac574b
trusted for code signing.
Kai Engert 9ac574b
Kai Engert 9ac574b
Kai Engert 9ac574b
COMMANDS
Kai Engert 9ac574b
--------
Kai Engert 9ac574b
(absent/empty command)::
Kai Engert 9ac574b
    Same as the *extract* command described below. (However, the command may
Kai Engert 9ac574b
    print fewer warnings, as this command is being run during rpm package 
Kai Engert 9ac574b
    installation, where non-fatal status output is undesired.)
Kai Engert 9ac574b
Kai Engert 9ac574b
*extract*::
Kai Engert 9ac574b
    Instruct update-ca-trust to scan the <<sourceconf,SOURCE CONFIGURATION>> and produce 
Kai Engert 9ac574b
    updated versions of the consolidated configuration files stored below
Kai Engert 9ac574b
    the /etc/pki/ca-trust/extracted directory hierarchy.
Kai Engert 9ac574b
Kai Engert 9ac574b
FILES
Kai Engert 9ac574b
-----
Kai Engert 9ac574b
/etc/pki/tls/certs/ca-bundle.crt::
Kai Engert ed9b40a
	Classic filename, file contains a list of CA certificates trusted for TLS server authentication usage, in the simple BEGIN/END CERTIFICATE file format, without distrust information.
Kai Engert 540618e
	This file is a symbolic link that refers to the consolidated output created by the update-ca-trust command.
Kai Engert 9ac574b
Kai Engert 9ac574b
/etc/pki/tls/certs/ca-bundle.trust.crt::
Kai Engert ed9b40a
	Classic filename, file contains a list of CA certificates in the extended BEGIN/END TRUSTED CERTIFICATE file format, which includes trust (and/or distrust) flags specific to certificate usage.
Kai Engert 540618e
	This file is a symbolic link that refers to the consolidated output created by the update-ca-trust command.
Kai Engert 9ac574b
Kai Engert 9ac574b
/etc/pki/java/cacerts::
Kai Engert ed9b40a
	Classic filename, file contains a list of CA certificates trusted for TLS server authentication usage, in the Java keystore file format, without distrust information.
Kai Engert 540618e
	This file is a symbolic link that refers to the consolidated output created by the update-ca-trust command.
Kai Engert 9ac574b
Kai Engert 9ac574b
/usr/share/pki/ca-trust-source::
Kai Engert 9ac574b
	Contains multiple, low priority source configuration files as explained in section <<sourceconf,SOURCE CONFIGURATION>>. Please pay attention to the specific meanings of the respective subdirectories.
Kai Engert 9ac574b
Kai Engert 9ac574b
/etc/pki/ca-trust/source::
Kai Engert 9ac574b
	Contains multiple, high priority source configuration files as explained in section <<sourceconf,SOURCE CONFIGURATION>>. Please pay attention to the specific meanings of the respective subdirectories.
Kai Engert 9ac574b
Kai Engert 9ac574b
/etc/pki/ca-trust/extracted::
Kai Engert 9ac574b
	Contains consolidated and automatically generated configuration files for consumption by applications, 
Kai Engert 9ac574b
	which are created using the 'update-ca-trust extract' command. Don't edit files in this directory, because they will be overwritten.
Kai Engert 9ac574b
	See section <<extractconf,EXTRACTED CONFIGURATION>> for additional details.
Kai Engert 9ac574b
Kai Engert 9ac574b
AUTHOR
Kai Engert 9ac574b
------
Kai Engert 9ac574b
Written by Kai Engert and Stef Walter.