Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 3. Using shared system certificates
Use the centralized system truststore in RHEL for managing TLS certificates. Using a shared trust location simplifies certificate management and verification across the system.
3.1. The system-wide truststore Copier lienLien copié sur presse-papiers!
RHEL contains a centralized system for managing TLS certificates. NSS, GnuTLS, OpenSSL, and Java use this shared certificate storage to retrieve system certificate anchors and denylist information.
By default, the truststore contains the Mozilla CA list, which includes both positive and negative trust. You can update the core Mozilla CA list by using the centralized system.
The system-wide truststore is located in the /etc/pki/ca-trust/ and /usr/share/pki/ca-trust-source/ directories. The trust settings in /usr/share/pki/ca-trust-source/ have lower priority than settings in /etc/pki/ca-trust/.
The system treats certificate files based on the subdirectory to which you install them:
Trust anchors belong to
-
/usr/share/pki/ca-trust-source/anchors/or -
/etc/pki/ca-trust/source/anchors/.
-
Distrusted certificates are stored in
-
/usr/share/pki/ca-trust-source/blocklist/or -
/etc/pki/ca-trust/source/blocklist/.
-
Certificates in the extended BEGIN TRUSTED file (OpenSSL trust certificate) format are located in
-
/usr/share/pki/ca-trust-source/or -
/etc/pki/ca-trust/source/.
-
To add a new certificate to the truststore:
-
For trusted certificates, copy the certificate to
/etc/pki/ca-trust/source/anchors/. -
For distrusted certificates, copy the certificate to
/etc/pki/ca-trust/source/blocklist/. -
Enter the
update-ca-trustcommand, or use thetrust anchorsubcommand.
See the update-ca-trust(8) and trust(1) man pages on your system for more information.
In a hierarchical cryptographic system, a trust anchor is an authoritative entity that other parties consider trustworthy. In the X.509 architecture, a root certificate is a trust anchor from which a chain of trust is derived. To enable chain validation, the trusting party must have access to the trust anchor.
3.2. Adding new certificates to the system-wide truststore Copier lienLien copié sur presse-papiers!
You can add new certificates to the system-wide truststore. All cryptographic applications running on the system recognize them as trusted.
Even though the Mozilla Firefox browser can use an added certificate without executing update-ca-trust, enter the update-ca-trust command after every CA change.
Browsers, such as Mozilla Firefox and Chromium, cache files. You might have to clear your browser’s cache or restart your browser to load the current system certificate configuration.
Prerequisites
-
The
ca-certificatespackage is present on the system.
Procedure
Copy your certificate file in the PEM or DER format to
/usr/share/pki/ca-trust-source/anchors/or/etc/pki/ca-trust/source/anchors/:# cp <~/certificate-trust-examples/Cert-trust-test-ca.pem> /usr/share/pki/ca-trust-source/anchors/Update the system-wide truststore configuration:
# update-ca-trust extract
3.3. Trusted system certificates management with the trust command Copier lienLien copié sur presse-papiers!
You can manage certificates within the shared system-wide truststore by using the trust command.
You can add or remove certificates from the system-wide truststore by using:
-
Basic file operations with the corresponding files and the
update-ca-trustcommand. See the Adding new certificates to the system-wide truststore section for details. -
The
trustcommand.
The trust command manages certificates in the shared system-wide truststore. You can use its subcommands to list, extract, add, remove, or change trust anchors.
To see the built-in help for the
trustcommand, enter it without any arguments or with the--helpdirective. Also, all subcommands of thetrustcommands provide a detailed built-in help, for example:$ trust list --help usage: trust list --filter=<what> …To list all system trust anchors and certificates, use the
trust listcommand, for example:$ trust list … pkcs11:id=%DD%04%09%07%A2%F5%7A%7D%52%53%12%92%95%EE%38%80%25%0D%A6%59;type=cert type: certificate label: SSL.com Root Certification Authority RSA trust: anchor category: authority …To store a trust anchor into the system-wide truststore, use the
trust anchorsubcommand. Specify a path to a certificate. Replace <path.to/certificate.crt> with the path to your certificate:# trust anchor <path.to/certificate.crt>To remove a certificate, use either a path to a certificate or the ID of a certificate:
# trust anchor --remove <path.to/certificate.crt> # trust anchor --remove "pkcs11:id=<%AA%BB%CC%DD%EE>;type=cert"
See the trust(1) man page on your system for more information.