Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8337742

CKR_FUNCTION_FAILED error when trying to connect to HSM

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      Hello,

      After upgrading java version from 11 to 21 we are unable to use HSM (Ultimaco CrypstoServer 5 simulator using libcs_pkcs11_R2.so library) anymore.
      During provider initialization we receive following exception:

      java.security.ProviderException: Initialization failed
      at jdk.crypto.cryptoki/sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:391)
      at jdk.crypto.cryptoki/sun.security.pkcs11.SunPKCS11$1.run(SunPKCS11.java:126)
      at jdk.crypto.cryptoki/sun.security.pkcs11.SunPKCS11$1.run(SunPKCS11.java:123)
      at java.base/java.security.AccessController.doPrivileged(AccessController.java:571)
      at jdk.crypto.cryptoki/sun.security.pkcs11.SunPKCS11.configure(SunPKCS11.java:123)
      Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_FUNCTION_FAILED
      at jdk.crypto.cryptoki/sun.security.pkcs11.wrapper.PKCS11.C_GetMechanismInfo(Native Method)
      at jdk.crypto.cryptoki/sun.security.pkcs11.Token.getMechanismInfo(Token.java:399)
      at jdk.crypto.cryptoki/sun.security.pkcs11.SunPKCS11.initToken(SunPKCS11.java:1313)
      at jdk.crypto.cryptoki/sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:382)
      ... 59 common frames omitted

      Bug also exists on Java 24. On Java 11 everything works fine.


      REGRESSION : Last worked in version 11.0.24


      FREQUENCY : always


            rkale Raghu Kale
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: