How to create a self signed certificate?

Hi Everyone!

       I am new to certificate creation . Can any one suggest me how to create a self signed certificate . I have used keytool for creating keystore.

The command that i have used is

keytool -genkey -keyalg RSA -alias abhijith -keystore sample.jks -storepass 123456 -validity 360 -keysize 1024.

After executing this command in the command prompt i can see a .jks file in the jvm location . i guess this will create a private key in the keystore file .

for self certificate creating i have used

keytool -storepass password -alias abhijith501 -keystore sample.jks -export -rfc -file outfilename.cer

is the above command correct or wrong?

After executing the above command i see an error as

“keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect”

But i have given the correct password.

Now my question is how to create a certificate from this keystore file.Would i be using any other commands for creating the certificate. if yes can you specify the command.

Correct me if am going in the wrong direction… waiting for your reply…

Thanks
Abhijith

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.