Creating a keystore (2024)

This topic describes how to create a JKS keystore.

The procedure uses the keytool utility to create a simple JKS keystore suitable for use with JSSE. Details of the keystore creation will vary depending on such factors as the tool you are using and the Certificate Authority who will sign the certificate.

This procedure assumes that you have added the keytool path to your PATH environment variable. This allows you to run the utility from anywhere on your machine. The procedure also assumes that you have created a directory (C:\MyKeys in this example) to create and store the keystore. Afterwards, you can copy it to the Jetty etc directory. (Alternatively, you can create the keystore in the Jetty etc directory.)

While creating the certificate, you will be asked to enter the Common Name for the certificate with this prompt:

What is your first and last name?

The Common Name is typically composed of Host + Domain Name. The Common Name must be the same as the Web address you will be accessing when connecting to a secure site. For the Endeca Server certificate, you can use the name of the server, including its full domain name. This procedure will use app23.example.com as the Common Name. After enabling SSL, you can specify the same Common Name with the --host option of the endeca-cmd commands.

To create a keystore:

  1. From a command prompt, navigate to the C:\MyKeys directory.
  2. Generate a private key and a self-signed public key, as in this sample command:
    keytool -genkey -alias server -validity 365 -keyalg RSA -keystore keystore

    The example uses the RSA algorithm and the keys will be stored in the keystore file. Note that you can use another name for your keystore file other than our keystore example).

  3. Answer the keytool DN prompts:
    Enter keystore password: strongKeystorePasswordRe-enter new password: strongKeystorePasswordOrWhat is your first and last name? [Unknown]: app23.example.comWhat is the name of your organizational unit? [Unknown]: Apps DepartmentWhat is the name of your organization? [Unknown]: example.comWhat is the name of your City or Locality? [Unknown]: CambridgeWhat is the name of your State or Province? [Unknown]: MassachusettsWhat is the two-letter country code for this unit? [Unknown]: USIs CN=app23.example.com, OU=Apps Department, O=example.com, L=Cambridge, ST=Massachusetts, C=US correct? [no]: yesEnter key password for <server> (RETURN if same as keystore password): <RETURN>

    When you answer the last prompt, keytool writes the keystore file in the current directory. The keystore contains a private key and a self-signed public key.

    Note that although you have the minimal requirements to run an SSL connection, the certificate you have generated will not be trusted by most clients. Therefore, the next step is to obtain a trusted certificate by having the public key signed by a known Certificate Authority (CA).

  4. Generate a Certificate Signing Request (CSR) with the -certreq option:
    keytool -certreq -alias server -keyalg RSA -file endeca.csr -keystore keystore

    When asked for the keystore password, enter the password you specified at Step 3.

  5. Send the CSR to a Certificate Authority (CA) for signing.

    The CA will send you a certificate file that bears the CA's signature.

  6. Import the signed certificate into the keystore:
    keytool -import -file rootCA.pem -keystore keystore -trustcacerts

    As part of the keytool dialog, you will be asked for the password you specified at Step 3 and also if you trust the certificate:

    Enter keystore password: strongKeystorePassword...Trust this certificate? [no]: yesCertificate was added to keystore
  7. If you created the keystore in a separate working directory, you can copy the keystore to the Jetty etc directory.

The next two steps are to obfuscate the keystore password and activate the SSL connector in the jetty-ssl.xml file.

Creating a keystore (2024)
Top Articles
On this day in 1628: Charles I's close friend, and sworn enemy of Parliament, George Villiers is murdered
Is a Happy Life Different from a Meaningful One?
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Selly Medaline
Latest Posts
Article information

Author: Edwin Metz

Last Updated:

Views: 5971

Rating: 4.8 / 5 (58 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Edwin Metz

Birthday: 1997-04-16

Address: 51593 Leanne Light, Kuphalmouth, DE 50012-5183

Phone: +639107620957

Job: Corporate Banking Technician

Hobby: Reading, scrapbook, role-playing games, Fishing, Fishing, Scuba diving, Beekeeping

Introduction: My name is Edwin Metz, I am a fair, energetic, helpful, brave, outstanding, nice, helpful person who loves writing and wants to share my knowledge and understanding with you.