I have to call a WebService via https. If I import the crt file in a specific keystore and then I set System properties:
System.setProperty("javax.net.ssl.trustStore", path);
System.setProperty("javax.net.ssl.trustStorePassword", pwd)
Everithing works fine. If I try to import crt file as a trusted certificate with this instruction:
keytool -trustcacerts -import -alias <alias> -file <path to crt file>
I get an javax.net.ssl.SSLHandshakeException.
How can I avoid the use of System properties?
How can I avoid the use of System properties?
Use a CA-signed certificate.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.