• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PKCS#11 Smartcard getting error: javax.net.ssl.SSLHandshakeException due to java.security.InvalidKey

 
Nope Torres
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on a project where we must get Smartcard to work in Linux. The card is by manufacture Izenpe. I get this error every time when I am doing SSL handshake with the server.

It seems that when getting the size of the private key in the smartcard, the RSA library fails to work. The previous steps are working (login with password in the card, getting the certificates for authetication).

By adding this line into my code I get many lines of logs about SSL.

At the end I can see this:


So, what can be the reason?

- I have changed the
, disabling the TLSv1.1 in the option

, because the server only uses TLSv1.1. No avial.
- The driver I used to load the Provider is from Izenpe website. From what I got in the Console of Eclipse, it's working.
 
Nope Torres
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, it should be *enabling only TLSv1.1, disabling SSLv3 and TLSv1.2.
 
Nope Torres
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another strange thing is that, it fails to do the authetication with smartcards, but if we have a p12/pfx type keystore file and we load that as inputstream, it works. The keystore in file is from another provider but it may be relavant.

Maybe that the driver reading the card cannot get access to the private key in a proper way?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic