To generate a keystore use the following command:

keytool -genkey -keysize 2048 -keyalg RSA -alias [your_alias] -keystore [your_keystore].jks

After running the command you will be asked for certain information necessary for issuing the CSR.

After the keystore and private key have been generated, you can generate the CSR running the following command:

keytool -certreq -alias [your_alias] -file [your_csr].csr -keystore [your_keystore].jks

It is necessary to enter the same details as those required in the above step.

Was this answer helpful? 0 Users Found This Useful (0 Votes)