JDK-7027235 : sun.security.pkcs11.wrapper.PKCS11Exception: CKR_OPERATION_NOT_INITIALIZED with JDK 7 b132
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.crypto:pkcs11
  • Affected Version: 7u6,8,9
  • Priority: P4
  • Status: Closed
  • Resolution: Incomplete
  • OS: generic
  • CPU: generic
  • Submitted: 2011-03-14
  • Updated: 2016-06-15
  • Resolved: 2016-06-15
Related Reports
Relates :  
Description
Application gets exception with JDK 7 b132 (which has changes to 6924489):

Exception in thread "Thread-2" java.security.ProviderException: doFinal() failed
        at sun.security.pkcs11.P11Cipher.implDoFinal(P11Cipher.java:750)
        at sun.security.pkcs11.P11Cipher.engineDoFinal(P11Cipher.java:517)
        at sun.security.pkcs11.P11Cipher.engineDoFinal(P11Cipher.java:500)
        at javax.crypto.Cipher.doFinal(Cipher.java:1873)
        at sun.security.ssl.CipherBox.dispose(CipherBox.java:687)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1794)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1743)
        at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1707)
        at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1652)
        at sun.security.ssl.AppInputStream.read(AppInputStream.java:113)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
        at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
        at com.sun.jndi.ldap.Connection.run(Connection.java:829)
        at java.lang.Thread.run(Thread.java:722)
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_OPERATION_NOT_INITIALIZED
        at sun.security.pkcs11.wrapper.PKCS11.C_DecryptFinal(Native Method)
        at sun.security.pkcs11.P11Cipher.implDoFinal(P11Cipher.java:743)
        ... 14 more

Comments
Closed as discussed&agreement w DEV.
15-06-2016

I think we will need to seek collaboration with Solaris team on this. This error code is too general and we need to narrow down the particular offending scenario.
14-01-2015