SSLHandshakeException: hostname in certificate didn't match
问题 I am writing a system that must make a multipart post to a server (a third-party program called ARX that is currently running on localhost during the development) that has a self-signed certificate. I tried to find its certificate, but can only find three different jks files; server.jks , servertrust.jks and serverca.jks . I have tried to use the System.setProperty("javax.net.ssl.trustStore", "Program Files\\<path>\\jksfile") with each of the jks files. However; when I do, I get the following