keytool -genkey -keyalg RSA -dname "cn=rahul,ou=OU,o=DEV,c=IN" -alias rahul12 -keypass rahul12 -keystore rahul12.jks -storepass rahul12 -validity 366
keytool -certreq -keyalg RSA -alias rahul12 -keypass rahul12 -keystore rahul12.jks -storepass rahul12 -file rahul12.cert
keytool -import -alias rahul12 -file rahul12.cert -keystore rahul_adapter -storepass rahul_adapter
In 1st command i am generating KeyStore, In 2nd command i am generating certificate and in 3rd step i am importing that certificate in rahul_adapter(universal keystore) . While importing it is giving Error java.lang.Exception: Input not an X.509 certificate.Can anybody tell me why i am getting this error.How to resolve that error and i also need certificate should be in CSR(Certificate Signing Requests) format not in any other format how to do that please help me????