I Have Jboss on Windows and I'm using it from Eclipse Luna . I have deployed a war
file that connects to another server through https
for authentication, but after successful authentication, I get this error:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I used InstallCert
to get the certificate from the server (it has a chain of certificates and I got the "bigger" one, meaning the one from the authority that signed them all) and I imported into %JAVA_HOME%\\jre\\lib\\security\\cacerts
and I still get this error. Can someone help me, please?
Thank you in advance.
If it's a trusted site you should put all the root CA certificates in your truststore.
Here is the easiest:
echo "" | openssl s_client -host [IP_ADDRESS_OF_THE_SSL_SERVER] -port [PORT_USUALLY_443] -prexit -showcerts > certs-chain.pem
Replace the part inside the square brakets (brakets included) with your actual running server
than issue the following command:
echo "[PASSWORD]\n[PASSWORD]\nyes\n" | keytool -import -alias whatever -file certs-chain.pem -keystore trust.jks
at this point you can run your jvm with the following parameter
-Djavax.net.ssl.trustStrore=trust.jks
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.