I want to write client-server using SSL with eclipse. I generate key using this command:
keytool -genkey -keystore mySrvKeystore -keyalg RSA
Then I want to import key to jre keystore to use eclipse to start applications using SSL. I use this command:
C:\jdk1.6.0_21\bin>keytool -import -alias klucz -file C:\mySrvKeystore -keystore C:\jre6\lib\security\cacerts
Next I type passoword ‘changeit’ and I get error:
keytool error: java.lang.Exception: Input not an X.509 certificate
Do someone know how can I handle with that? Thanks for any help
I think you are looking for the steps to create a self-signed certificate. You can follow the procedure shown below or simply google “keytool self signed certs”
http://www.sslshopper.com/article-how-to-create-a-self-signed-certificate-using-java-keytool.html