The cacerts Certificates File
A certificates file named cacerts resides in the security properties directory, java.home\lib\security, where java.home is the runtime environment directory (the jre directory in the SDK or the top-level directory of the Java™ 2 Runtime Environment).
changeit
. System administrators should change that password and
the default access permission of that file when installing the SDK. You can import the new root certificates manually into the cacerts
truststore,
if required, by taking the following steps:
-
Obtain the root certificates from the official provider.
-
Set the PATH environment variable to point to the IBM® JRE/SDK:
Unixexport PATH=[path to SDK]/bin:$PATH
Windowsset PATH=[path to SDK]\bin;%PATH%
-
Verify that IBM Java is being picked up correctly:
$ java -version
-
Import the root certificates into the
cacerts
keystore with their alias:$ keytool -import -alias xxxx -file xxxx.der -keystore /path-to-sdk/jre/lib/security/cacerts -storepass "changeit"
Notes:- “changeit” is the default password as provided by the VM. You can change it.
- Specify the path to the file in the import commands.
- If the certificates are available in the
.pem
format and if the.pem
format isn't recognized by the keystore, convert it to.der
by using the following command and then use the.der
certificates.$ openssl x509 -outform der -in [certificate-filename].pem -out [certificate-filename].der
You are prompted with “Trust this certificate? [no]” to confirm whether you want to continue with the import of the root certificates.
-
Type
YES
and pressRETURN
. -
Verify that the certificates were imported with the following command:
$ keytool -list -v -keystore /path-to-sdk/jre/lib/security/cacerts -storepass "changeit"
For a sample importing of the root certificates manually, refer to Service refresh 8 fix pack 35.