first of all this is not a duplicate question as most people report this exception when creating a Public Key from a Certificate which is missing \"---BEGIN RSA CERTIFICATE
You've moved your smart card provider in front of the other providers on Java SE, and for some reason it is also trying to verify RSA signatures instead of just using it for RSA private key operations.
There are a few methods of solving this:
Security
class (check the JCA documentation on how to do this)Signature
class, I would recommend specifying "SunRsaSign"
(you may want to make this string configurable)com.mse
that they should implement delayed provider selection correctly and not gobble up software public keys for use in their hardware deviceNote that talking about "server side" is very confusing as the smart card acts as a server. "Terminal side" and "card side" would be a much more clear.