Create a directory under /usr/local/share/ca-certificates
with the name of your choosing, and place the public CA certificate of your CA server into it in PEM format, as a *.crt
file. Then run update-ca-certificates
.
It will add your local CA certificate in the system-wide /etc/ssl/certs
in several formats:
- as a OpenSSL-style directory of PEM-formatted certificates with symlinks with certificate hashes at
/etc/ssl/certs
- as a single file of all trusted CA certs in PEM format at
/etc/ssl/certs/ca-certificates.crt
- and in any other forms that may be created by any script(s) placed in
/etc/ca-certificates/update.d
, e.g.:
- if a Java package has been installed, there will be a
/etc/ca-certificates/update.d/jks-keystore
script that will generate a JKS keystore of CA certificates as /etc/ssl/certs/java/cacerts
.
There is a man page man update-ca-certificates
, and more documentation in /usr/share/doc/ca-certificates
. However, unless you read all the documentation thoroughly, you might miss the fact that you'll need to create a directory under /usr/local/share/ca-certificates
and place your CA certificate within it; any certificate files at the top /usr/local/share/ca-certificates
level will be ignored.
The update-ca-certificates
command is used in Debian and related distributions; the update-ca-trust
you found mentioned originates from Fedora, and seems to be also used in Arch (and related distributions perhaps?).
Both commands do basically the same job, although the exact pathnames vary somewhat between them, as each family of distributions has maintained a slightly different directory hierarchy of system-wide CA certificates.
update-ca-certificates
": how did you precisely do that? Can you give more details?/usr/local/share/ca-certificates
, as that little pitfall is not exactly obvious and caused me a quite a bit of head-scratching when I first tried to add a local CA certificate "the Debian way". So I wrote my answer, let's see if it helps. I'll be deleting my earlier comments as redundant.