Does Java Crypto JCA Provider really require windows dll?
certificate, cryptography, java, smartcard
Solution
The PKCS#11 Reference Guide is a good place to start.
Gemalto smart cards always ship with a PKCS#11 DLL, unfortunately it has different names depending on the card. Just look through the files that came with your installation until you find a DLL with "p" and "11" in it :)
After you located it, you may follow the steps given in the reference guide, i.e. create a configuration file that points to the PKCS#11 library etc. If everything went well, you should be able to access the smart card as simply as
KeyStore ks = KeyStore.getInstance("PKCS11");
ks.load(null, "pin".toCharArray());
Please note that for production code you should implement a proper `CallbackHandler` as outlined in the guide, of course - the above is just for a quick check that everything works.
Problem
As I read here here: "Unlike most Java Cryptography Architecture (JCA) providers, the Sun PKCS#11 Provider does not implement the cryptographic functionality directly; it relies on a native PKCS#11 implementation to which it forwards all operations. This implementation must be available as a .dll file in Windows or a .so file in UNIX and Linux. For example, if you use the Utimaco SafeGuard Smartcard Provider for Windows, the PKCS#11 implementation is the library pkcs201n.dll." Are smartcard provider obliged to have jca provider? For example where can I find jca provider for gemalto ?