I'm working on a Spring Java app that requires HTTPS, and I followed Spring's guide to configure SSL.
My application.properties file contains the following:
server.port = 8443
server.ssl.key-store = classpath:keystore.p12
server.ssl.key-store-password = password
server.ssl.key-password = password
server.ssl.keyStoreType = JCEKS
server.ssl.keyAlias = alias
When the app is run, the console outputs Tomcat started on port(s): 8443 (https)
, but any request to the server results in a 0 NO RESPONSE
status.
What am I missing?
You need to use file:// . FileNotFoundException: C:\Windows\Temp\tomcat. 8707914234839952642.1111\file:\c:\path\to\file\keystore.
The steps to install a new certificate into the Java default truststore are: extract cert from server: openssl s_client -connect server:443. import certificate into truststore using keytool: keytool -import -alias alias.server.com -keystore $JAVA_HOME/jre/lib/security/cacerts.
Problem seems to be the specified encryption algorithm. I was generating the key using keytool
, with -keyalg AES
. Changed it to use RSA with -keyalg RSA
and it works now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With