Useful commands for SSL certificates

Generate self signed certificate and export to truststore 1. Generate a certificate using keygen command in windows keytool -genkey -alias myAlias -keyalg RSA -sigalg SHA256withRSA -keystore keystore.jks -validity 10950 2. Self certify the csertificate keytool -selfcert -alias mycert-20161109 -keystore keystore.jks -validity 3950 3. Export certificate to folder keytool -export -alias myAlias -keystore keystore.jks -rfc -file

Read More