• Post Reply Bookmark Topic Watch Topic
  • New Topic

Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException  RSS feed

 
pankaj semwal
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Team,

I need to consume .NET ssl authorization based restfull web service.But i am getting following exception.

Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No name matching qa.............. found.

Below is the code i used to invoke web service.



Please tell me what is the issue.

Thanks & Regards,

Pankaj Semwal
 
Elijah Marshall
Greenhorn
Posts: 4
IntelliJ IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The application is not finding the certificate in your keystore or whatever it's called. It slips my mind right now.
I've had this issue many times and it had boiled down to normally these 3 things.
1. The cert is not installed or the wrong cert was installed
2. The system is looking at a different keystore location and not the one you installed the cert into
3. The application in code is trying to set the path to the keystore, username, password etc but security is preventing the app from actually writing to the system properties.

Hope this helps some.
 
A.J. Côté
Ranch Hand
Posts: 417
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Elijah Marshall wrote:The application is not finding the certificate in your keystore or whatever it's called. It slips my mind right now.
I've had this issue many times and it had boiled down to normally these 3 things.
1. The cert is not installed or the wrong cert was installed
2. The system is looking at a different keystore location and not the one you installed the cert into
3. The application in code is trying to set the path to the keystore, username, password etc but security is preventing the app from actually writing to the system properties.

Hope this helps some.


Great reply!

What bugs me although is that we got to the SSLHandshake stage. If you can't find your client cert what's the point of trying to go to the handshake stage although this could fit into case 1?

Maybe it's just an inconsistency in the jdk code and your right after all.

The other possibility I am thinking of is that the server the user is trying to connect to doesn't recognize the client cert as a valid one but this is just my 2 cents. It this case you might have to make the changes on the server.

SSLHandshakeException:
Indicates that the client and server could not negotiate the desired level of security. The connection is no longer usable.

https://docs.oracle.com/javase/7/docs/api/javax/net/ssl/SSLHandshakeException.html




 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!