Contents

Popular

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A keystore is a file that holds the public and private key pairs and certificates. The Keystore is a database of public and private keys. Java keytool is used to generate the public/private key pairs. Java keytool utility is present at can be accessed from %JAVA_HOME%/bin.

To generate a keystore, perform the following actions:

  1. Open a Command prompt window and type in the following command and press ENTER:
    %JAVA_HOME%\bin\keytool -genkey -alias [alias name] -keystore [keystoreName] -keyalg [algorithm] -validity [days in integer] -storepass [store password] - keypass [key password]
     
  2. Here is a brief description of the options used in the keytool command:

    Key

    Description

    -genkey

    Requests keytool to generate a key pair

    -alias

    Identifies the new key pair within the keystore

    -storetype

    Declares the type of the keystore. JKS is the default typestoretype

    -keyalg

    Declares the algorithm to be used; we are using the . RSA public key algorithm, which is the default algorithm.

    -storepass

    Specifies the password for the entire keystore

    -keypass

    Specifies the password for the new key pair

    -Validity

    It is the validity Validity of the key pair in days

    -keystore

    File that holds the public and private key pairs

    For example, to generate the keystore in the directory d:\WorkStudio\keystore, provide the command would be:

    D:\WorkStudio\keystore>%JAVA_HOME%\bin\keytool -genkey -alias client1 -keystore client1.keystore -keyalg RSA -validity 365 -storepass cl1storepass -keypass cl1keypass
     

  3. Press ENTER. The result of the command is as shown in the figure below figure.


    Figure 1: Running the keytool command

 

Info
  1. You will have to type in your Type-in the answers to the questions as shown in (see the figure above). The keystore file is generated in the specified directory. The next step is to create a truststore and add the server certificate in to it (explained in the next section).
  2. In the above example, client1 is the host alias. To configure POP3, it client1 should be provided as the value in value for the alias textbox in within the SignatureConfiguration panel.
Adaptavist ThemeBuilder EngineAtlassian Confluence