The Error:
javax.net.ssl.SSLException: Certificate for <localhost> doesn't match any of the subject alternative names: [xxxxxxx.xxx.xxxxxx.xxx]
I have a Spring Boot App running in my localhost
. I also have a tunnel ssh
via putty to a server.
Things I have done:
- I manually created/imported keys/certificates of all ways.
- I used -ext from keytool to add the dns addr and the localhost to SAN.
- I also used a openSource java file to install the cert.
- I changed the hosts files to: 127.0.0.1 xxx.xxx.xxxxxxx.xxx (if I ping the dns name it responds to the localhost address)
- I used the VM Arguments -Djavax.net.debug=ssl to check if the certs are loading properly.
What am I missing? BTW, I'm also using a VPN.