-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
11.0.1
-
None
-
x86_64, sparc_64
-
solaris_11
During st_035 we are seeing sun/security/pkcs11/Cipher/ tests fail reporting "Could not initialize cipher"
This is impacting the following cases...
sun/security/pkcs11/Cipher/ReinitCipher.java
sun/security/pkcs11/Cipher/TestSymmCiphers.java
sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java
#-----testdescription-----
$file=/opt/jdk/jdk11local/test/jdk/sun/security/pkcs11/Cipher/ReinitCipher.java
$root=/opt/jdk/jdk11local/test/jdk
author=Andreas Sterbenz
keywords=bug4856966 randomness othervm
library=/test/lib ..
modules=jdk.crypto.cryptoki
run=USER_SPECIFIED main/othervm ReinitCipher\nUSER_SPECIFIED main/othervm ReinitCipher sm\n
source=ReinitCipher.java
title=
#-----environment-----
#-----testresult-----
description=file\:/opt/jdk/jdk11local/test/jdk/sun/security/pkcs11/Cipher/ReinitCipher.java
elapsed=1773 0\:00\:01.773
end=Wed Nov 28 22\:01\:29 UTC 2018
environment=regtest
execStatus=Failed. Execution failed\: `main' threw exception\: java.security.InvalidKeyException\: Could not initialize cipher
harnessLoaderMode=Classpath Loader
harnessVariety=Full Bundle
hostname=spv-t5-2-01-ld8
javatestOS=SunOS 5.11 (sparcv9)
javatestVersion=5.0
jtregVersion=jtreg 4.2 fcs b12
modules=jdk.crypto.cryptoki
script=com.sun.javatest.regtest.exec.RegressionScript
sections=script_messages build compile main
start=Wed Nov 28 22\:01\:27 UTC 2018
test=sun/security/pkcs11/Cipher/ReinitCipher.java
testJDK=/usr/jdk/jdk-11.0.1
totalTime=1773
user.name=root
work=/autohome/jdk.2135926/work/sun/security/pkcs11/Cipher
----------System.err:(26/1648)----------
java.security.InvalidKeyException: Could not initialize cipher
at jdk.crypto.cryptoki/sun.security.pkcs11.P11Cipher.implInit(P11Cipher.java:399)
at jdk.crypto.cryptoki/sun.security.pkcs11.P11Cipher.engineInit(P11Cipher.java:299)
at java.base/javax.crypto.Cipher.init(Cipher.java:1283)
at java.base/javax.crypto.Cipher.init(Cipher.java:1223)
at ReinitCipher.main(ReinitCipher.java:61)
at PKCS11Test.premain(PKCS11Test.java:180)
at PKCS11Test.testDefault(PKCS11Test.java:267)
at PKCS11Test.main(PKCS11Test.java:215)
at ReinitCipher.main(ReinitCipher.java:44)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_MECHANISM_INVALID
at jdk.crypto.cryptoki/sun.security.pkcs11.wrapper.PKCS11.C_EncryptInit(Native Method)
at jdk.crypto.cryptoki/sun.security.pkcs11.P11Cipher.initialize(P11Cipher.java:446)
at jdk.crypto.cryptoki/sun.security.pkcs11.P11Cipher.implInit(P11Cipher.java:397)
... 14 more
JavaTest Message: Test threw exception: java.security.InvalidKeyException: Could not initialize cipher
JavaTest Message: shutting down test
STATUS:Failed.`main' threw exception: java.security.InvalidKeyException: Could not initialize cipher
This is impacting the following cases...
sun/security/pkcs11/Cipher/ReinitCipher.java
sun/security/pkcs11/Cipher/TestSymmCiphers.java
sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java
#-----testdescription-----
$file=/opt/jdk/jdk11local/test/jdk/sun/security/pkcs11/Cipher/ReinitCipher.java
$root=/opt/jdk/jdk11local/test/jdk
author=Andreas Sterbenz
keywords=bug4856966 randomness othervm
library=/test/lib ..
modules=jdk.crypto.cryptoki
run=USER_SPECIFIED main/othervm ReinitCipher\nUSER_SPECIFIED main/othervm ReinitCipher sm\n
source=ReinitCipher.java
title=
#-----environment-----
#-----testresult-----
description=file\:/opt/jdk/jdk11local/test/jdk/sun/security/pkcs11/Cipher/ReinitCipher.java
elapsed=1773 0\:00\:01.773
end=Wed Nov 28 22\:01\:29 UTC 2018
environment=regtest
execStatus=Failed. Execution failed\: `main' threw exception\: java.security.InvalidKeyException\: Could not initialize cipher
harnessLoaderMode=Classpath Loader
harnessVariety=Full Bundle
hostname=spv-t5-2-01-ld8
javatestOS=SunOS 5.11 (sparcv9)
javatestVersion=5.0
jtregVersion=jtreg 4.2 fcs b12
modules=jdk.crypto.cryptoki
script=com.sun.javatest.regtest.exec.RegressionScript
sections=script_messages build compile main
start=Wed Nov 28 22\:01\:27 UTC 2018
test=sun/security/pkcs11/Cipher/ReinitCipher.java
testJDK=/usr/jdk/jdk-11.0.1
totalTime=1773
user.name=root
work=/autohome/jdk.2135926/work/sun/security/pkcs11/Cipher
----------System.err:(26/1648)----------
java.security.InvalidKeyException: Could not initialize cipher
at jdk.crypto.cryptoki/sun.security.pkcs11.P11Cipher.implInit(P11Cipher.java:399)
at jdk.crypto.cryptoki/sun.security.pkcs11.P11Cipher.engineInit(P11Cipher.java:299)
at java.base/javax.crypto.Cipher.init(Cipher.java:1283)
at java.base/javax.crypto.Cipher.init(Cipher.java:1223)
at ReinitCipher.main(ReinitCipher.java:61)
at PKCS11Test.premain(PKCS11Test.java:180)
at PKCS11Test.testDefault(PKCS11Test.java:267)
at PKCS11Test.main(PKCS11Test.java:215)
at ReinitCipher.main(ReinitCipher.java:44)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_MECHANISM_INVALID
at jdk.crypto.cryptoki/sun.security.pkcs11.wrapper.PKCS11.C_EncryptInit(Native Method)
at jdk.crypto.cryptoki/sun.security.pkcs11.P11Cipher.initialize(P11Cipher.java:446)
at jdk.crypto.cryptoki/sun.security.pkcs11.P11Cipher.implInit(P11Cipher.java:397)
... 14 more
JavaTest Message: Test threw exception: java.security.InvalidKeyException: Could not initialize cipher
JavaTest Message: shutting down test
STATUS:Failed.`main' threw exception: java.security.InvalidKeyException: Could not initialize cipher
- duplicates
-
JDK-8176837 SunPKCS11 provider needs to check more details on PKCS11 Mechanism
- Closed