0 Replies Latest reply: Dec 15, 2013 3:03 PM by user10878887 RSS

    CKR_TOKEN_NOT_RECOGNIZED

    user10878887

      I have a application that uses PKCS11 tokens.

      A special model of token can't be used it this application because of the error pasted down.

      The error appears in the code at the last line in the code(p11.C_GetTokenInfo):

      File dllFile = new File(dllFileName);

      if(dllFile.exists()) {

          PKCS11 p11 = PKCS11.getInstance(dllFileName, "C_GetFunctionList", null, false);

          long[] slots = p11.C_GetSlotList(true); // true - numai token prezent

          for (int j = 0; j < slots.length; j++) {

              CK_TOKEN_INFO tokenInfo = null;

              try {

                  tokenInfo = p11.C_GetTokenInfo(slots[j]);

       

      DLL file is C:\WINDOWS\system32\asepkcs.dll

       

      SEVERE: null

      sun.security.pkcs11.wrapper.PKCS11Exception: CKR_TOKEN_NOT_RECOGNIZED

          at sun.security.pkcs11.wrapper.PKCS11.C_GetTokenInfo(Native Method)

          at sun.security.pkcs11.wrapper.PKCS11$SynchronizedPKCS11.C_GetTokenInfo(PKCS11.java:1504)

          at pkcs11.pkcs11.loadSecurityProviders(pkcs11.java:196)

          at SoapUtils.Soap.executeMethod(Soap.java:150)

          at ToBeReimplemented.NewAddParaRequest.AddParaGrupTestFormNewStyle$8$1.call(AddParaGrupTestFormNewStyle.java:1746)

          at java.util.concurrent.FutureTask.run(FutureTask.java:262)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

          at java.lang.Thread.run(Thread.java:744)

       

      Thank you.