0

There is a option of generating pdf from html page in my web application.Following exception is coming while doing that. In this html page we are accessing css files over https.However, I am able to access web application over https successfuly.

javax.net.ssl.SSLHandshakeException: 
           sun.security.validator.ValidatorException: PKIX path building failed: 
           sun.security.provider.certpath.SunCertPathBuilderException: 
           unable to find valid certification path to requested target

Caused by: sun.security.validator.ValidatorException: 
           PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: 
           unable to find valid certification path to requested target

Caused by: sun.security.provider.certpath.SunCertPathBuilderException: 
           unable to find valid certification path to requested target

Please provide your valubale suggestions. Thanks!!

Infotechie
  • 1,653
  • 6
  • 23
  • 35

1 Answers1

0

Your browser uses a certificate store, and checks if the public certificate of the site you're visiting is available. If it is, you'll have no problems visiting the site.

Java also checks its certificate store, but it's different from the one used by your browser. This is explained in the white paper on digital signatures Search the document for PKIX, and you'll discover what's going on.

Bruno Lowagie
  • 75,994
  • 9
  • 109
  • 165
  • Thanks Bruno for sharing such a good link. My web application is deployed on Linux machine. Do you have any idea how to add a certificate on jre's keystore? – Infotechie Sep 05 '12 at 05:21
  • It doesn't really matter if you're working on Linux or Windows. You need the keytool application that comes with the JDK. If you can't install it on the server, just copy the cacerts file, add the certificate on whatever machine you want, and replace the existing cacerts file with the updated one. – Bruno Lowagie Sep 06 '12 at 08:05
  • Yes you are right. Finally i got success in creating and installing self signed certificate but still not able to add StandardAltNames under [req_extensions]. Do you have any idea? I actually saw one of the questions related to the same topic, answered by you, but it doesn't work for me. – Infotechie Sep 10 '12 at 16:43