Skip to content

How to create a keystore

assimbly edited this page Apr 19, 2019 · 5 revisions

Create Keystore (Truststore)

Below is an example how to create a keystore and import a certificate with keystore explorer (GUI) or keytool (Command line). The Keytool tool is distributed with JDK and can be found in the bin directory.

Part 1: Create keystore (jks file)

A) GUI

The easiest way is to create a keystore with help of keystore explorer. This tool can be download here:

https://keystore-explorer.org/downloads.html

B) Command line

Here is an example to create from command line

C:\Program Files\Java\jdk1.8.0_144\bin>keytool -keystore clientkeystore -genkey -alias client

Enter keystore password:

Re-enter new password:

What is your first and last name?

[Unknown]: john doe

What is the name of your organizational unit?

[Unknown]: gateway

What is the name of your organization?

[Unknown]: assimbly

What is the name of your City or Locality?

[Unknown]: amsterdam What is the name of your State or Province?

[Unknown]: amsterdam What is the two-letter country code for this unit?

[Unknown]: nl Is CN=john doe, OU=gateway, O=assimbly, L=amsterdam, ST=amsterdam, C=nl correct?

[no]: yes

Enter key password for <client>

    ``(RETURN if same as keystore password):``

Save your keystore password in your favorite password manager!

Clone this wiki locally