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

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-trust command, or use the trust anchor subcommand.

See the update-ca-trust(8) and trust(1) man pages on your system for more information.

Note

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.

You can add new certificates to the system-wide truststore. All cryptographic applications running on the system recognize them as trusted.

Note

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-certificates package is present on the system.

Procedure

  1. 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/
  2. Update the system-wide truststore configuration:

    # update-ca-trust extract

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:

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 trust command, enter it without any arguments or with the --help directive. Also, all subcommands of the trust commands 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 list command, 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 anchor subcommand. 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.

Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top