This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Sockets and Internet Protocols and the fly likes Certificatioon error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Certificatioon error" Watch "Certificatioon error" New topic
Author

Certificatioon error

ravindra patil
Ranch Hand

Joined: Sep 01, 2006
Posts: 230
HI ,

I am getting following error javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path validation failed:
java.security.cert.CertPathValidatorExceptions ignature check failed

at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1623)

at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:198)


is anything wrong with certificate
Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

Hi Ravindra,

Some additional details like your setup, code snippets, context would help us to understand the problem.


Regards
KumarRaja

Prakash Dewangan
Greenhorn

Joined: Jan 21, 2011
Posts: 5
Hi Ravindra

javax.net.ssl.SSLHandshakeException: is the exception when you call other HTTPS url (also it can be webservice url).

Please get the certificate from the provider of the URL and import it to your application.

-Prakash
ravindra patil
Ranch Hand

Joined: Sep 01, 2006
Posts: 230
Hi,no when i am logging into the application i am importing the certificate , but while executing
following code

URL url = new URL(clientSideURL + "/" + jspName + "?" + jspParams);
HttpURLConnection uc = (HttpURLConnection) url.openConnection();
uc.addRequestProperty("Accept-Language",c.getSession().getLanguage());
uc.setDoOutput(false);
if (cookieString != null) {
uc.setRequestProperty("Cookie", cookieString);
}
InputStream in = uc.getInputStream();
i am getting this issue any solution to this
Prakash Dewangan
Greenhorn

Joined: Jan 21, 2011
Posts: 5
can you please explain little how you are importing the certificate?
ravindra patil
Ranch Hand

Joined: Sep 01, 2006
Posts: 230
invoking my web app url using https at that time got certification alert i followed step like add exception get certificate
well have you configure ssl in eclipse IDE
Prakash Dewangan
Greenhorn

Joined: Jan 21, 2011
Posts: 5
Well... you will get the certificate from the Server admin..

You need to import it, and create keystore and truststore, this will be used with HTTP client.

I wanted to know the code or the configuration. can you please paste that here.
 
Don't get me started about those stupid light bulbs.
 
subject: Certificatioon error