clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
522 stars 29 forks source link

[java] openjdk test sun/security/pkcs11/KeyStore/SecretKeysBasic failed on java-basic package #1154

Open vivanov-gh opened 5 years ago

vivanov-gh commented 5 years ago

The openjdk test jdk/test/sun/security/pkcs11/KeyStore/SecretKeysBasic.java failed on the java-basic package with output:

Beginning test run SecretKeysBasic... Running test with provider SunPKCS11-nss... softkey> javax.crypto.spec.SecretKeySpec@fffe87f0 ALGO=AES [RAW] VALUE=20F784DCCCAB71B05C5B50C44C409EA4 skey1> SunPKCS11-nss DESede secret key, 168 bits (id 1, session object, not sensitive, extractable) ALGO=DESede [RAW] VALUE=CB62083870B31F64643D34A483E5EFF8B59D8CC8F8BAA734 skey2> SunPKCS11-nss DESede secret key, 168 bits (id 2, session object, not sensitive, extractable) ALGO=DESede [RAW] VALUE=6225CEE9C4CD0B3126CB92DC25AB80D31F97EF403D130492 libsoftokn3 version = 3.441. ECC Basic. libnss3 version = 3.441. ECC None. Number of entries: 0 Test against nss Failed! ----------System.err:(14/860)---------- Exception in thread "main" java.security.ProviderException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_SENSITIVE

output for RHEL7.7 where this test passed is

Beginning test run SecretKeysBasic... Running test with provider SunPKCS11-nss... softkey> javax.crypto.spec.SecretKeySpec@17e4a ALGO=AES [RAW] VALUE=F90EE697F9A7C8C3E337F5AC54744D1D skey1> SunPKCS11-nss DESede secret key, 168 bitssession object, not sensitive, extractable) ALGO=DESede [RAW] VALUE=104F43831098D01C3261B0BAD0023149E0312A5B89EC4C37 skey2> SunPKCS11-nss DESede secret key, 168 bitssession object, not sensitive, extractable) ALGO=DESede [RAW] VALUE=6EC4D31C6DD368B085DC164AE53476DF37A132EA67522531 libsoftokn3 version = 3.44. ECC Basic. libnss3 version = 3.44. ECC None. Number of entries: 0 Reloading keystore... Reloading keystore... Completed test with provider SunPKCS11-nss (83 ms).

How to reproduce:

  1. checkout openjdk ws: hg clone https://hg.openjdk.java.net/jdk8u/jdk8u/ and get sources as "cd jdk8u; get_source.sh"
  2. checkout latest build for the jtreg harness https://ci.adoptopenjdk.net/view/Dependencies/job/jtreg
  3. set java8 as default java in system, JT_HOME and PATH variables
  4. run tests as jtreg jdk/test/sun/security/pkcs11/KeyStore/SecretKeysBasic.java
AthenasJimenez commented 5 years ago

@vivanov-gh Would you mind to share the openjdk relase used on RHEL?

vivanov-gh commented 5 years ago

It was tested on the same openjdk 8 u222 build.