java32-bitsunpkcs11

Sun PKCS11 library C_Encrypt and C_Decrypt changes


Up until now I was using C_Encrypt and C_Decrypt methods of Sun PKCS11 Wrapper smoothly. It was;

C_Encrypt(v1,v2,v3,v4,v5,v6,v7)  # requiring 7 parameters

But after upgrading from Ubuntu 16.04 to 18.04, my Java updated to 1.8.0_275 build. Now it requires 9 parameters;

public native int C_Encrypt(long var1, long var3, byte[] var5, int var6, int var7, long var8, byte[] var10, int var11, int var12) throws PKCS11Exception;

I cannot find any documentation online to how to use new wrapper functions. Any help would be appreciated. Thanks.


Solution

  • Here you can find the latest version OpenJDK has released.

    After the updates that come with PKCS11 v2.40 version, C_Encrypt and C_Decrypt methods requires 9 parameters. You can find the details here.