Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Generating a certificate

I am gussing guessing that you have a certificate that is either not properly generated or is not installed in your jks keystore.

...

No Format
%JAVA_HOME%\bin\keytool -delete -alias tomcat -keypass changeit

%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keypass changeit -keyalg RSA

%JAVA_HOME%\bin\keytool -export -alias tomcat -keypass changeit  -file
%FILE_NAME%

%JAVA_HOME%\bin\keytool -import -file server.crt -keypass changeit
-keystore %JAVA_HOME%/jre/lib/security/cacerts

%JAVA_HOME%\bin\keytool -import -file server.crt -keystore
%JAVA_HOME%\jre\lib\security\cacertcacerts

Expiration Date of Certificate

If you want the certificate to be valid for longer than the default amount of time, you can provide an option parameter in the following format:

No Format

-validity numberOfDays 

which allows you specify the number of days a certificate is valid for. So in the above example you would use the following command to create the certificate and have it valid for 365 days:

No Format

%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keypass changeit -keyalg RSA -validity 365

World-readability

K.C. Baltz reminded the List that the public cert files must be world-readable, as noted in the README.

...