{{theTime}}

Search This Blog

Total Pageviews

How to add public certificates to JRE KeyStore ?

Use KeyTool java utility to add public certificates to the Java KeyStore. 

Why is it required?

To connect to remote server which requires digital certificate authentication, it is required to add the public certificate to the Java Run time trusted list.  Java KeyStore is a file and stores the keys and certificates.  Keytool manages own public/private key pairs and certificates and also cache certificates.


Example:

Download client1.cer and run the below command line tool.

·         jre\bin> keytool – import  –trustcacerts  -file c:\client1.cer  -keystore jre\lib\security\cacerts

Password is – changeit

Certificate is trusted = Y


No comments:

Java Virtual Threads Java Virtual Threads Java Virtual Threads, introduced in Java 21 (JDK 18), are lightweight ...