A certificate generated using the Java keytool command is compatible with products such as Apache Tomcat, and vFabric tc Server and can be used to provide secure encrypted communications.
This article provides the steps to generate a self-signed SSL certificate using the Java keytool command.
To generate a self-signed SSL certificate using the keytool command on Windows, Mac, or Linux:
Run this command
keytool -genkey -keyalg RSA -alias tomcat -keystore selfsigned.jks -validity <days> -keysize 2048
Where <days> indicate the number of days for which the certificate will be valid.
keytool -list -v -keystore selfsigned.jks
The certificate is now complete and can be used by Apache Tomcat, or vFabric tc Server.