First of all, I know that there similar questions already asked and I tried to follow the suggestions to troubleshoot but haven't got any luck. So, I'm at the point that I think I'd better off just post for help. Thank you, in advance, for your help.
Question: What am I doing wrong? What/where should I check?
Objective: I'm trying to set up a certificate on Tomcat. I have Tomcat 8.5, %JAVA_HOME%="C:\Program Files\Java\jdk1.8.0_121" and a certificate I generated with the following command:
keytool -genkeypair -alias cert -keyalg RSA -keysize 2048 -sigalg SHA256withRSA -keypass 123456 -storepass 123456 -keystore d:\cert.jks
And filled out my name and other information, etc. to generate the key pair.
I saw many YouTube videos and other instructions mention "genkey" instead "genkeypair" but this option isn't available on this computer. Anyway, I modified the server.xml file by adding the following:
<Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateKeystoreFile="D:\cert.jks" type="RSA" keystorePass="123456" />
</SSLHostConfig>
</Connector>
Executing catalina configtest gave me this:
04-Apr-2017 19:28:16.271 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["https-jsse-nio-443"]
java.lang.IllegalArgumentException: java.io.IOException: Keystore was tampered with, or password was incorrect