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.
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.