This results in a file in /etc/pki/ca-trust/extracted/pem/directory-hash/.
As it turns out this is not where openssl looks by default which is governed by /etc/pki/tls/openssl.cnf.
What I would like to know is how do the various browsers (chrome, firefox) and programs (curl) make use of these root certificates?
Do they use openssl or some std library?
Here are some of my guesses as to where these root certificates are obtained.
This seems like a bit of a mess.
Possible root cert source
System-Wide Trust Store Updates (update-ca-trust tool)
The update-ca-trust utility managed the system-wide CA certificates.
When a root certificate is added to /etc/pki/ca-trust/source/anchors/ and the update-ca-trust command is executed,
it updates the consolidated bundle of CA certificates that is used by the system components relying on the system trust store.
/etc/pki/ca-trust/extracted/pem/directory-hash
Network Security Services (NSS)
openssl defaults
/etc/pki/tls/certs or /etc/ssl/certs.
OpenSSL or GnuTLS libraries
Which are configured to refer to this central store for trusted root certificates.
Tool Use What?
curl and wget (using OpenSSL or GnuTLS)
openssl defaults
Chrome/Chromium
Network Security Services
The system’s trust store
Firefox
Own trust store managed through the application’s settings under Certificate Manager.
You will now have a p11-kit server running for your user. The socket which can communicate with it can then be binded into flatpaks giving them access to pkcs11 tokens inside the flatpak.
After enabling the systemd unit, how do you allow FlatPak browsers to use them? I have used FlatSeal, but there is nothing related to p11 that I could find.
When I use curl , I still get a certificate error. The certificate seems to be installed correctly:
❯ sudo openssl verify -CAfile /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /etc/pki/ca-trust/source/anchors/mycert.crt
/etc/pki/ca-trust/source/anchors/mycert.crt: OK