From c93dcafa78e0c734da704a0a72cd1f451d0a6e11 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Tue, 7 Feb 2023 09:39:09 +0900 Subject: [PATCH] adding-new-certificates: Prefer to using "trust anchor" command There are a couple of methods to install a certificate into the trust store: using "trust anchor" or copying the file to /etc/pki/ca-trust/source/anchors/. The former is simpler and more flexible as it doesn't require update-ca-trust and the installed certificates can be removed with "trust anchor --remove". For more context, see: https://bugzilla.redhat.com/show_bug.cgi?id=2163554 Signed-off-by: Daiki Ueno --- .../_partials/proc_adding-new-certificates.adoc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/_partials/proc_adding-new-certificates.adoc b/modules/ROOT/pages/_partials/proc_adding-new-certificates.adoc index cb5495a..bc760b9 100644 --- a/modules/ROOT/pages/_partials/proc_adding-new-certificates.adoc +++ b/modules/ROOT/pages/_partials/proc_adding-new-certificates.adoc @@ -1,19 +1,26 @@ [id='proc_adding-new-certificates'] = Adding New Certificates -To add a certificate in the simple PEM or DER file formats to the list of CAs trusted on the system, copy the certificate file to the `/etc/pki/ca-trust/source/anchors/` directory, for example: +Often, system administrators want to install a certificate into the trust store. This can be done with the [command]`trust anchor` sub-command of the [command]`trust` command, as described in xref:managing-trusted-system-certificates[Managing Trusted System Certificates]. + +Alternatively, you can simply copy the certificate file in the PEM or DER file format to the `/etc/pki/ca-trust/source/anchors/` directory, followed by running the [command]`update-ca-trust` command, for example: [subs="+quotes,macros"] ---- # cp _~/certificate-trust-examples/Cert-trust-test-ca.pem_ _/etc/pki/ca-trust/source/anchors/_ ---- -To update the system-wide trust store configuration, use the [command]`update-ca-trust` command: - ---- # update-ca-trust ---- +The [command]`update-ca-trust` command ensures that the certificate bundles in application-specific formats, such as Java keystore, are regenerated. + +[NOTE] +==== +The certificates installed in the above steps cannot be removed with the [command]`trust anchor --remove`. +==== + [NOTE] ==== While the Firefox browser is able to use an added certificate without executing [command]`update-ca-trust`, it is recommended to run [command]`update-ca-trust` after a CA change. Also note that browsers, such as Firefox, Epiphany, or Chromium, cache files, and you might need to clear the browser's cache or restart your browser to load the current system certificates configuration.