64 bit alternative to SunPkcs11 implementation [cl

2019-05-17 08:27发布

问题:

We use a middle-ware to build software applications which is installed over JDK 1.6.30 64 bit setup.

We recently got a requirement to sign certain requests using USB token. I googled around and found out that an implementation is provided by Sun in the name of SunPKCS11. But, the same is only available in 32 bit JRE until Java 8.

I want to know if there are any alternative non commercial implementations available out there which I can make use of.

Please note that upgrading Java or changing the architecture is not an option as there is a high dependency on the middleware.

回答1:

Its not available for jdk 1.6 (applicable for windows only) but available for Java 8 64bit. See this answer for more details

Refer this link where it says:

The Sun PKCS#11 provider is supported on Solaris (SPARC and x86) and Linux (x86) in both 32-bit and 64-bit Java processes. It is also supported on 32-bit Windows (x86) but not currently on 64-bit Windows platforms due to the lack of suitable PKCS#11 libraries.

Link



回答2:

It seems from some research that the IAIK wrapper for PKCS#11 is also compatible with 64 bit. You could use this to sign, but IAIK does not provide a JCE compatible provider for free. This means that you can use it for direct calls to the PKCS#11 library underneath, but you would loose all compatibility with the standard Java functionality build around the JCE. The Sun and IAIK PKCS#11 providers are build on top of this free library.