Red Hat puts all X.509/PEM files for use with TLS under /etc/pki/tls
Whereas, the rest of the Linux distro world puts it under /etc/ssl
.
Why? Because, they can.
Creating a symbolic link to /etc/ssl/certs/ca-certificates.crt in /etc/pki/tls/certs/ca-bundle.crt fixes the issue.
Simply create a ~/.curlrc file.
Then add the following lines to the file:
capath=/etc/ssl/certs/ cacert=/etc/ssl/certs/ca-certificates.crt
This is where Go looks for public root certificates:
"/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu/Gentoo etc. "/etc/pki/tls/certs/ca-bundle.crt", // Fedora/RHEL 6 "/etc/ssl/ca-bundle.pem", // OpenSUSE "/etc/pki/tls/cacert.pem", // OpenELEC "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", // CentOS/RHEL 7 "/etc/ssl/cert.pem", // Alpine Linux
Also:
"/etc/ssl/certs", // SLES10/SLES11, https://golang.org/issue/12139 "/system/etc/security/cacerts", // Android "/usr/local/share/certs", // FreeBSD "/etc/pki/tls/certs", // Fedora/RHEL "/etc/openssl/certs", // NetBSD "/var/ssl/certs",
To complicate things further, this is where Debian looks for CA certificates:
This article details how the rebuilding of Trusted Root CA occurs on a Debian
Linux using the update-ca-certificates
tool as part of ca-certificates
Debian package.
Also it details what my current thoughts are regarding the auditable aspect of Root CA, its intermediate CA, trusted CA and blacklisting CAs.
Executing the update-ca-certificates --fresh
using strace -f
has enabled me
to compile a list of files read and written.
The list of files that are opened and read-only are in the following order:
/etc/ca-certificates.conf
file/usr/share/ca-certificates/*
directory/usr/share/ca-certificates/mozilla/*
directory/usr/share/ca-certificates/*/*
directory/usr/local/share/ca-certificates/*
directory/usr/local/share/ca-certificates/*/*
directory/etc/ssl/certs
directory$CWD/<all-certs-read-before>
files/usr/lib/ssl/openssl.cnf
file/etc/ca-certificates/update.d
directory/etc/ca-certificates/update.d/jks-keystore
directory/etc/default/cacerts
directory/etc/java-11-openjdk/security/nss.cfg
file/usr/share/ca-certificates-java
directory/usr/lib/jvm/java-11-openjdk-amd64/lib/jvm.cfg
file/usr/share/ca-certificates-java/ca-certificates-java.jar
file/etc/ca-certificates/update.d/mono-keystore
directory/etc/mono/4.5/machine.config
file/etc/mono/assemblies/cert-sync/cert-sync.config
file/etc/mono/assemblies/Mono.Security/Mono.Security.config
file/etc/mono/assemblies/mscorlib/mscorlib.config
file/etc/mono/assemblies/System/System.config
file/etc/mono/config
file/etc/ssl/certs/ca-certificates.crt
file$HOME/.mono/config
file/usr/lib/mono/4.5/cert-sync.exe.config
file/usr/lib/mono/4.5/cert-sync.exe.config
file/usr/lib/mono/4.5/mscorlib.dll.config
file/usr/lib/mono/gac/Mono.Security/4.0.0.0_0738eb9f132ed765/Mono.Security.dll.config
file/usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.config
file/usr/share/.mono/certs/Trust/ski-*.cer
file/usr/share/.mono/certs/new-certs/XXXXXXXX.0
file$CWD/openssl
EXECUTABLE!!! (why look in $CWD?)/usr/bin/openssl
/usr/local/bin/openssl
/usr/local/sbin/openssl
/usr/sbin/openssl
(VERY STRANGE ordering of /usr/[local/][s]bin/
Writes to the following text files:
$CWD/ca-certificates.txt
/etc/ssl/certs/java/cacerts
Observation of update-ca-certificates.
I noticed a very strange ordering of looking for the openssl
binary.
Probably should have been something in the (re)order of:
- $CWD/openssl (probably should NOT have this entry)
- /usr/local/sbin/openssl
- /usr/local/bin/openssl
- /usr/sbin/openssl
- /usr/bin/openssl
Probably should OUTPUT various 'modules' being touched up during the rebuilding of CA certificates:
- MONO
- OpenJDK Java 11
- Mozilla
then
- OS System
Probably should OUTPUT what various CREATION of files:
$CWD/ca-certificates.txt
/etc/ssl/certs/java/cacerts
Probably should indicate those summarization AT THE END of its output, broken down by CA-CERTIFICATE MODULES. Like:
OS System:
Added: 0
Deleted: 0
Used: 0
Mozilla package:
Added: 0
Deleted: 0
Used: 129
OpenJDK package:
Added: 0
Deleted: 0
Used: 86
MONO package:
Added: 0
Deleted: 0
Used: 44
Total Merge: 129
Master File: /usr/share/ca-certificates (depends on distro)
Master File: /etc/ca-certificates
Master File: /etc/ssl/certs
Master File: /etc/pki/tls/certs
Will try and find appropriate package maintainer and/or author to let them know of these findings.
Reference:
- Security Shared System Certificates - Redhat
- Debian CA trust tool