Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8296631: NSS tests failing on OL9 linux-aarch64 hosts #2955

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
20 changes: 14 additions & 6 deletions test/jdk/sun/security/pkcs11/PKCS11Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -949,14 +949,22 @@ protected void copyNssCertKeyToClassesDir() throws IOException {

protected void copyNssCertKeyToClassesDir(Path dbPath) throws IOException {
Path destinationPath = Path.of(TEST_CLASSES);
String keyDbFile = "key3.db";
String certDbFile = "cert8.db";
String keyDbFile3 = "key3.db";
String keyDbFile4 = "key4.db";
String certDbFile8 = "cert8.db";
String certDbFile9 = "cert9.db";

Files.copy(dbPath.resolve(certDbFile),
destinationPath.resolve(certDbFile),
Files.copy(dbPath.resolve(certDbFile8),
destinationPath.resolve(certDbFile8),
StandardCopyOption.REPLACE_EXISTING);
Files.copy(dbPath.resolve(keyDbFile),
destinationPath.resolve(keyDbFile),
Files.copy(dbPath.resolve(certDbFile9),
destinationPath.resolve(certDbFile9),
StandardCopyOption.REPLACE_EXISTING);
Files.copy(dbPath.resolve(keyDbFile3),
destinationPath.resolve(keyDbFile3),
StandardCopyOption.REPLACE_EXISTING);
Files.copy(dbPath.resolve(keyDbFile4),
destinationPath.resolve(keyDbFile4),
StandardCopyOption.REPLACE_EXISTING);
}

Expand Down
6 changes: 6 additions & 0 deletions test/jdk/sun/security/pkcs11/Provider/MultipleLogins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ esac

# first make cert/key DBs writable

${CP} ${TESTSRC}${FS}..${FS}nss${FS}db${FS}cert9.db ${TESTCLASSES}
${CHMOD} +w ${TESTCLASSES}${FS}cert9.db

${CP} ${TESTSRC}${FS}..${FS}nss${FS}db${FS}key4.db ${TESTCLASSES}
${CHMOD} +w ${TESTCLASSES}${FS}key4.db

${CP} ${TESTSRC}${FS}..${FS}nss${FS}db${FS}cert8.db ${TESTCLASSES}
${CHMOD} +w ${TESTCLASSES}${FS}cert8.db

Expand Down
Binary file modified test/jdk/sun/security/pkcs11/Secmod/cert9.db
Binary file not shown.
Binary file modified test/jdk/sun/security/pkcs11/Secmod/key4.db
Binary file not shown.
8 changes: 6 additions & 2 deletions test/jdk/sun/security/pkcs11/Secmod/pkcs11.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
library=
name=NSS Internal PKCS #11 Module
parameters=configdir='sql:./tmpdb' certPrefix='' keyPrefix='' secmod='' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription=''
NSS=Flags=internal,critical trustOrder=75 cipherOrder=100 slotParams=(1={slotFlags=[RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512] askpw=any timeout=30})
parameters=configdir='sql:./tmpdb' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription=''
NSS=trustOrder=75 cipherOrder=100 slotParams={0x00000001=[slotFlags=RSA,RC4,RC2,DES,DH,SHA1,MD5,MD2,SSL,TLS,AES,RANDOM askpw=any timeout=30 ] } Flags=internal,critical

library=libnssckbi.so
name=Builtin Roots Module
NSS=trustOrder=100
2 changes: 1 addition & 1 deletion test/jdk/sun/security/pkcs11/SecmodTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class SecmodTest extends PKCS11Test {
static String DBDIR;
static char[] password = "test12".toCharArray();
static String keyAlias = "mykey";
static boolean useSqlite = false;
static boolean useSqlite = true;

static void useSqlite(boolean b) {
useSqlite = b;
Expand Down
Binary file added test/jdk/sun/security/pkcs11/fips/cert9.db
Binary file not shown.
Binary file added test/jdk/sun/security/pkcs11/fips/key4.db
Binary file not shown.
8 changes: 8 additions & 0 deletions test/jdk/sun/security/pkcs11/fips/pkcs11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
library=
name=NSS Internal PKCS #11 Module
parameters=configdir='sql:./tmpdb' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription=''
NSS=trustOrder=75 cipherOrder=100 slotParams={0x00000001=[slotFlags=RSA,RC4,RC2,DES,DH,SHA1,MD5,MD2,SSL,TLS,AES,RANDOM askpw=any timeout=30 ] } Flags=internal,critical

library=libnssckbi.so
name=Builtin Roots Module
NSS=trustOrder=100