Java Keytool Tutorial: How to generate a Self-Signed certificate using the Java Keytool

///Java Keytool Tutorial: How to generate a Self-Signed certificate using the Java Keytool

Java Keytool Tutorial: How to generate a Self-Signed certificate using the Java Keytool

FavoriteLoadingAdd to favorites

The Java keytool allows your to generate certs that you can use with applications such as Tomcat. The below tutorial will show you how to generate a self signed cert that you can use with your applications.

Java468x60

It starts from the very beginning and shows you how to install Java, set up a key store and generate your jks cert.

This guide will first show you how to download Java JDK.

You will then add java to your path.

Next you will use the Java keytool to create a Java keystore

You will then generate a Self-Signed cert using the Java Key tool.

This cert will be in JKS format.

Finally you will view the certificates in the keystore to see the cert which you generated using java keytool commands.

A full text tutorial can be found here:

source

By |2019-10-07T23:00:22+00:00October 7th, 2019|Java Video Tutorials|14 Comments

14 Comments

  1. Srividhya Lakshminarayanan October 7, 2019 at 11:00 pm - Reply

    Is this a private-public key pair generated? I see privatekey generated…Is it possible to generate a keypair using keytool?

  2. AKHIL SURYA A October 7, 2019 at 11:00 pm - Reply

    hey how can I set validity on that certificate and how to configure it with my .jar file

  3. TC Skateboard October 7, 2019 at 11:00 pm - Reply

    Can I do it with Open JDK Instead Java SE? (It seems that needs a license…)

  4. Smile October 7, 2019 at 11:00 pm - Reply

    thanks a lot

  5. Aman Agrawal October 7, 2019 at 11:00 pm - Reply

    Do this require cmd to be open in admin mode as i am getting an error, "keystore location not found "

  6. Hooch October 7, 2019 at 11:00 pm - Reply

    save yourself 2 mins 25 secs by fast fwding to that time index…

  7. khalid kech October 7, 2019 at 11:00 pm - Reply

    keytool error: java.io.FileNotFoundException: C:ProgramDataMicrosoftWindowsStart Menudesktop.jks (Access is denied)
    help me please

  8. Akash Tiwari October 7, 2019 at 11:00 pm - Reply

    In ssl (non java) certificates you will get private key with separate certificate. I originally thought with the genkey command you used we get private key and we need to run certreq to get the certificate.

    also if we try to curl the url in Linux you get error. I am not sure if adding the certificate to truststore will resolve that issue.

  9. Taha Berraissoul October 7, 2019 at 11:00 pm - Reply

    Good job bro, but i want ask you .
    i want generate keystore for my apk, how can i put this in CMD

  10. Fauzia Iqbal October 7, 2019 at 11:00 pm - Reply

    Hello Darren, I love ur video. can you also do this for windows 7. the process is quite different

  11. TheOnlyRareOne October 7, 2019 at 11:00 pm - Reply

    I created it so what now? how to I use it?

  12. TheOnlyRareOne October 7, 2019 at 11:00 pm - Reply

    mines says keytool error: java.iofilenotfoundexception C:local keystore

  13. Dylan Candra October 7, 2019 at 11:00 pm - Reply

    My command prompt says that keytool isn't recognized as an internal or external command

  14. yash zode October 7, 2019 at 11:00 pm - Reply

    Amazing

Leave A Comment

*