Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to make JVM to accept self-sign certificate from server

843829May 12 2006 — edited May 15 2006
Hi does any one out there knows how to set the JVM in java code so that I can connect to a server by ssh and and accept the server self sign certificate without throwing this HandShake exception..
javax.net.ssl.SSLH and shakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.
SunCertPathBuilderException: unable to find valid certification path to requested target

Look like my client code is connecting to a self-sign certificate server but my client can't trust the certificate on the server side and this exception is throw. Does any one knows how to by pass this. Is there a way for me to make the JVM to accept/Trust all certificate.
Thanks
Any hint is greatly appreciated
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2006
Added on May 12 2006
1 comment
411 views