Exporting the .crt file to Java and the JRE cacert keystore

Execute the following command to find your Java installation directory:

/usr/libexec/java_home

Alternatively, execute the following command directly to add the .crt file to Java cacerts:

keytool -import -alias thekeystore -storepass password -file thekeystore.crt -keystore "$(/usr/libexec/java_home)jrelibsecuritycacerts"

The following figure shows successful execution of the preceding command in a command prompt window:

Figure 4: Exporting .crt file to Java keystore

When setting up a client, make sure that the JDK used is the same as the one in which we have added the .crt file. To reflect the certification addition on to Java, a restart of the machine is suggested.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.246.72