I manually added some new certificates to /etc/pki/ca-trust/extracted/java/cacerts
and it makes Java trust these certificates as Java is configured to use this certificate location. However, from what I'm reading to do it properly and and make sure this change survives future cert system updates it should be done so:
- add to
/etc/pki/ca-trust/source/anchors
- run
update-trust-ca
However, this doesn't work, i.e. certificates from source anchors are not transferred to Java cacerts
.
A proposed solution discussed here https://access.redhat.com/discussions/3018271 is to first run "trust anchor /etc/pki/ca-trust/source/anchors/*.cer" but then I'm getting "p11-kit: couldn't create object: The field is read-only". How can this error be fixed? How to proceed with it?
System:
cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
Java:
java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)