UPDATE-CA-TRUST(8) | update-ca-trust | UPDATE-CA-TRUST(8) |
NAME¶
update-ca-trust - manage consolidated and dynamic configuration of CA certificates and associated trust
SYNOPSIS¶
update-ca-trust [COMMAND]
DESCRIPTION¶
update-ca-trust(8) is used to manage a consolidated and dynamic configuration feature of Certificate Authority (CA) certificates and associated trust.
The feature is available for new applications that read the consolidated configuration files found in the /etc/pki/ca-trust/extracted directory or that load the PKCS#11 module p11-kit-trust.so
This manual page is specific to the series of RHEL 6 releases, which implements this configuration as an optional feature for legacy applications.
Many legacy applications expect CA certificates and trust configuration in a fixed location, contained in files with particular path and name, or by referring to a classic PKCS#11 trust module provided by the NSS cryptographic library.
The dynamic configuration feature can optionally provide functionally compatible replacements for classic configuration files and for the classic NSS trust module named libnssckbi.
By default, the replacements are disabled, the classic file locations are kept as static files, and the classic PKCS#11 module filename still refers to the classic module provided by the NSS cryptographic library.
In order to enable legacy applications, that read the classic files or access the classic module name, to make use of the new consolidated and dynamic configuration feature, the compatible replacements can be enabled using the update-ca-trust enable command.
When enabled, the classic filenames are changed to symbolic links. The symbolic links will refer to dynamically created and consolidated output stored below the /etc/pki/ca-trust/extracted directory hierarchy.
The output is produced using the update-ca-trust command (without parameters), or using the update-ca-trust extract command. In order to produce the output, a flexible set of source configuration is read, as described in section SOURCE CONFIGURATION.
In addition, if the replacements are enabled, the classic PKCS#11 module is replaced by a new PKCS#11 module (p11-kit-trust.so) that dynamically reads the same source configuration.
Use the update-ca-trust check command to display the enabled or disabled state of the compatible replacements.
On computer systems that used modified copies of the classic configuration files, prior to enabling the compatible replacements, a manual migration of the system’s CA and trust configuration modifications is required. It is advisable to compare the active configuration with the original configuration that had been used as a base for the modified copies, because software active on the system may depend on past modifications to the classic configuration files.
Alternatively, on a system with modified copies of the classic configuration files, you may accept to lose any past configuration modifications and forcefully switch to the most recent set of standard CA certificates and trust, using the update-ca-trust force-enable command.
When using the update-ca-trust enable or update-ca-trust force-enable commands, backups of the classic configuration files will be created in the /etc/pki/backup-traditional-original-config (on the first execution) and /etc/pki/backup-traditional-recent-config (on the first on all subsequent executions) directories. The backup files will be restored when disabling the compatible replacements using the update-ca-trust disable or update-ca-trust force-disable commands.
DISABLED OR ENABLED COMPATIBLE REPLACEMENTS¶
When disabled (default):
When enabled:
The classic filenames and the classic PKCS#11 module mentioned above are:
SOURCE CONFIGURATION¶
The dynamic configuration feature uses several source directories that will be scanned for any number of source files. It is important to select the correct subdirectory for adding files, as the subdirectory defines how contained certificates will be trusted or distrusted, and which file formats are read.
Files in subdirectories below the directory hierarchy /usr/share/pki/ca-trust-source/ contain CA certificates and trust settings in the PEM file format. The trust settings found here will be interpreted with a low priority.
Files in subdirectories below the directory hierarchy /etc/pki/ca-trust/source/ contain CA certificates and trust settings in the PEM file format. The trust settings found here will be interpreted with a high priority.
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:
QUICK HELP 1: To add a certificate in the simple PEM or DER file formats to the list of CAs trusted on the system:
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:
In order to offer simplicity and flexibility, the way certificate files are treated depends on the subdirectory they are installed to.
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:
In the anchors subdirectories /usr/share/pki/ca-trust-source/anchors/ or /etc/pki/ca-trust/source/anchors/ you may install one or multiple certificates in either the DER file format or in the PEM (BEGIN/END CERTIFICATE) file format. Each certificate will be treated as trusted for all purposes.
In the blacklist subdirectories /usr/share/pki/ca-trust-source/blacklist/ or /etc/pki/ca-trust/source/blacklist/ you may install one or multiple certificates in either the DER file format or in the PEM (BEGIN/END CERTIFICATE) file format. Each certificate will be treated as distrusted for all purposes.
Please refer to the x509(1) manual page for the documentation of the BEGIN/END CERTIFICATE and BEGIN/END TRUSTED CERTIFICATE file formats.
Applications that rely on a static file for a list of trusted CAs may load one of the files found in the /etc/pki/ca-trust/extracted directory. After modifying any file in the /usr/share/pki/ca-trust-source/ or /etc/pki/ca-trust/source/ directories or in any of their subdirectories, or after adding a file, it is necessary to run the update-ca-trust extract command, in order to update the consolidated files in /etc/pki/ca-trust/extracted/ .
Legacy applications that rely on classic filenames benefit from configuration updates only if the functionally compatible replacements are enabled.
Applications that use the classic PKCS#11 module libnssckbi.so on a system with enabled compatible replacements, and any application capable of loading PKCS#11 modules and loading p11-kit-trust.so, will benefit from the dynamically merged set of certificates and trust information stored in the /usr/share/pki/ca-trust-source/ and /etc/pki/ca-trust/source/ directories.
EXTRACTED CONFIGURATION¶
The directory /etc/pki/ca-trust/extracted/ contains generated CA certificate bundle files which are created and updated, based on the SOURCE CONFIGURATION by running the update-ca-trust extract command.
If your application isn’t able to load the PKCS#11 module p11-kit-trust.so, then you can use these files in your application to load a list of global root CA certificates.
Please never manually edit the files stored in this directory, because your changes will be lost and the files automatically overwritten, each time the update-ca-trust extract command gets executed.
In order to install new trusted or distrusted certificates, please rather install them in the respective subdirectory below the /usr/share/pki/ca-trust-source/ or /etc/pki/ca-trust/source/ directories, as described in the SOURCE CONFIGURATION section.
The directory /etc/pki/ca-trust/extracted/java/ contains a CA certificate bundle in the java keystore file format. Distrust information cannot be represented in this file format, and distrusted certificates are missing from these files. File cacerts contains CA certificates trusted for TLS server authentication.
The directory /etc/pki/ca-trust/extracted/openssl/ contains CA certificate bundle files in the extended BEGIN/END TRUSTED CERTIFICATE file format, as described in the x509(1) manual page. File ca-bundle.trust.crt contains the full set of all trusted or distrusted certificates, including the associated trust flags.
The directory /etc/pki/ca-trust/extracted/pem/ contains CA certificate bundle files in the simple BEGIN/END CERTIFICATE file format, as described in the x509(1) manual page. Distrust information cannot be represented in this file format, and distrusted certificates are missing from these files. File tls-ca-bundle.pem contains CA certificates trusted for TLS server authentication. File email-ca-bundle.pem contains CA certificates trusted for E-Mail protection. File objsign-ca-bundle.pem contains CA certificates trusted for code signing.
COMMANDS¶
(absent/empty command)
check
disable
enable
extract
force-enable
force-disable
FILES¶
/etc/pki/tls/certs/ca-bundle.crt
/etc/pki/tls/certs/ca-bundle.trust.crt
/etc/pki/java/cacerts
/usr/share/pki/ca-trust-source
/etc/pki/ca-trust/source
/etc/pki/ca-trust/extracted
AUTHOR¶
Written by Kai Engert and Stef Walter.
09/13/2022 | update-ca-trust |