Folks,
I am trying to run some java cipher/decipher programs that rely on native code (code which connects through the network to an HSM box).
The issue is that theboth Linux kernel and JVM are 64 bit. But the native library seems to be 32 bit. I get the following message when trying to run the sample:
Exception in thread "main" java.lang.UnsatisfiedLinkError: jcryptoki (/opt/Eracom/lib/libjcryptoki.so: wrong ELF class: ELFCLASS32)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:981)
at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:950)
at java.lang.System.loadLibrary(System.java:453)
at jprov.cryptoki.Cryptoki.<clinit>(Cryptoki.java:38)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:194)
at au.com.eracom.crypto.provider.ERACOMProvider.<clinit>(ERACOMProvider.java:329)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:194)
at SHA512Generator.main(SHA512Generator.java:10)
Is there any workaround or should I contact my HSM vendor and ask for a 64 bit version of this native library?