0

I was using jre6 with NSS (version 3.4.12) in my project and it was working fine.

I recently updated to jre7 update 6 (Released 2012 Aug 14th), and suddenly the application stopped working giving following exception.

java.lang.UnsatisfiedLinkError: sun.security.pkcs11.wrapper.PKCS11.C_GetOperationState(J)[B
    at sun.security.pkcs11.wrapper.PKCS11.C_GetOperationState(Native Method)
    at sun.security.pkcs11.P11Digest.clone(P11Digest.java:308)
    at java.security.MessageDigest$Delegate.clone(Unknown Source)
    at sun.security.ssl.HandshakeHash.cloneDigest(Unknown Source)
    at sun.security.ssl.HandshakeHash.getMD5Clone(Unknown Source)
    at sun.security.ssl.HandshakeMessage$Finished.getFinished(Unknown Source)
    at sun.security.ssl.HandshakeMessage$Finished.<init>(Unknown Source)
    at sun.security.ssl.ClientHandshaker.sendChangeCipherAndFinish(Unknown Source)
    at sun.security.ssl.ClientHandshaker.serverHelloDone(Unknown Source)
    at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
    at sun.security.ssl.Handshaker.processLoop(Unknown Source)
    at sun.security.ssl.Handshaker.process_record(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)

If i use jre 7 update 5, and its working fine !!! I went through the release notes of update 6 http://www.oracle.com/technetwork/java/javase/7u6-relnotes-1729681.html and i cant find anything that might have caused..

Any help is appreciated.

Atul Soman
  • 4,612
  • 4
  • 30
  • 45
  • When i compared java source code from update 5 to 6, i have found that in update 6, sun.security.pkcs11.wrapper.P11Digest.java has newly implemented clone() which is trying to call native method PKCS11.C_GetOperationState which is also newly added in update 6. I dont know if they can add native methods just like that. Also i dont see any such mention in the update 6 revision history. To me it looks like PKCS11 interface is broken in jre7 update 6 – Atul Soman Aug 29 '12 at 12:50

3 Answers3

0

There were changes in SunPKCS11 for RSA in Java 7. But I am not sure that above behaviour is happening because of that.

Amit Deshpande
  • 19,001
  • 4
  • 46
  • 72
0

Bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7195931 opened on jre.

Atul Soman
  • 4,612
  • 4
  • 30
  • 45
0

Sun has fixed this issue.

Its scheduled for jre7 u9. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7195931

Atul Soman
  • 4,612
  • 4
  • 30
  • 45