Java Keystore - Certificate Management
Dealing with the Java keystore is not new for the software developers working with Java.
But many a times, developers who work with several other technology stack come across the necessity of dealing with java keystoe(jks).
A simple, easy way to deal with it is given below.
The software
The software I am working with is KeyStore Explorer.
This software can be used on Windows, Linux and MacOS. Installable can be downloaded separately. If you are fan of portable apps, you can download the zip version that will work with all the operating systems. This software can be downloaded from the link below
https://keystore-explorer.org/downloads.html
Setup
Install as per your operating system. For portable version, simply unzip to the desired folder.
The Keystore explorer needs a JRE to run. If your laptop has a pre-installed JRE, please make sure the JAVA_HOME environment variable is set.
If you already have a portable JRE, you can copy the JRE folder in the installation directory of the KeyStore Explorer.
Working with KeyStore Explorer
Creating a new keystore
- Open the KeyStore Manager (kse.exe/ kse.sh)
- Click on the new button on the left top corner (or File-> New)
- Choose the type of keystore preferred(PKCS12 and JKS being mostly used)
- Now add your certificates to the keystore using the "Import Trusted Certificate" option. Simply click and browse the certificate to add it to the keystore.
- Save your keystore- Click on the Save button on the options or File ->Save or Save As, choose the target location and the target filename.
- When saving the keystore, it will ask you to set and confirm the password for the keystore. Please make sure to keep this information safe as you would need this in future when using the keystore.
Note : Please make sure to append the file extension as you prefer. The software does not automatically add the filename extension.
Opening and editing a keystore
- Open the KeyStore Manager (kse.exe/ kse.sh)
- Click on the Open button or File -> Open option.
- Browse and select your jks file.
- It will ask for the keystore password, please enter it in the password box.
Now the keystore is opened for viewing and editing. You can add new certificates or keys to the keystore or remove the expired certificates and keys from the store.
Comments
Post a Comment