简体   繁体   中英

PKIX path building failed in Java application, for self-signed SSL certificate

I created a pair of SSL certificates using OpenSSL, self-signed, to secure the HTTPS connection for a JBoss application.

When I ran the application and tried to get access by HTTPS, it did not show the site and threw an error in my console:

PKIX path building failed in Java application

I know that I should import some certs into Java, like what they said:

The long story short here is to run java InstallCert server:1234 to generate a file called jssecacerts. Then, drop this file in ${JAVA_HOME}/lib/security directory.

What I do not understand:

1.in fact I try to get access to host B from host A, using HTTPS, why should I add the certificate of my own host to Java, not the client one?

2.using this method, there is nothing to do with my actual certificates (I mean .key and .crt), is that normal?

you need to enter your certificate inside java cacert file

This link demonstrate it the best.

Step 1 : Download certificate Step 2 : store inside cacert

That is it! your problem resolved.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM