Importing a Certificate Authority into your JVM Certificate Authority Store
You want to connect Redwood Server to remote servers over SSL/TLS that use self-signed certificates. You have signed these certificates with your Certificate Authority (CA). You retrieve the CA root certificate that you used for signing and import that into the CA store of your JVM.
To get the CA certificate file; ask the person who signed the certificate or if it is stored in a keystore, export it from the keystore.
warning
Always make sure that you can trust the certificate prior to importing!
note
The keytool and paths are the same on HP, IBM, and Oracle JVM's; the instructions do not differ for these platforms.
Prerequisites
- The root CA certificate file must be available.
- Installed and configured Java Development Kit (JDK), which should ideally be the latest version shipped by the platform vendor (it must be supported).
Procedure
Import the CA File into your JVM CA Store
- The
keytool
must be from the JVM used by your application server; if you have Redwood Server running in a cluster, you have to perform the following on each cluster node. - Run the following command:
keytool -cacerts -importcert -alias <some_alias> -file <file>
.- You will be prompted for the password. The default password is
changeit
. - Run the following command to check the certificate has been imported successfully:
keytool -list -keystore cacerts
.
Change the Default Store Password
- The
keytool
must be from the JVM used by your application server; if you have Redwood Server running in a cluster, you have to perform the following on each cluster node. - The command must be run as super-user or Administrator.
keytool -storepasswd -keystore cacerts
.- You will be prompted for the password. The default password is
changeit
. You will be prompted to specify the new password twice, to make sure you make no typo.
Exporting a Certificate from a keystore
- From the command line, perfom the following command.
keytool -exportcert -alias <alias> -file <file>.cer {-keystore <keystore> | -cacerts}
.<alias>
- the alias you specified when you created the keystore.<file>
- the output file name.<keystore>
- the keystore which you used to sign the original certificate, use-cacerts
to import into thecacerts
store.
See Also
onsiteTopic