Skip to content

Commit

Permalink
8296631: NSS tests failing on OL9 linux-aarch64 hosts
Browse files Browse the repository at this point in the history
Reviewed-by: aph
Backport-of: 6e1aacdfba5a32f7b071eea8039888d275827e83
  • Loading branch information
GoeLin committed Jan 9, 2024
1 parent d44b5dc commit c21a12d
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 15 deletions.
Binary file not shown.
Binary file not shown.
30 changes: 18 additions & 12 deletions test/jdk/sun/security/pkcs11/PKCS11Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -627,12 +627,10 @@ private static Map<String, String[]> getOsMap() {
osMap.put("Linux-arm-32", new String[]{
"/usr/lib/arm-linux-gnueabi/nss/",
"/usr/lib/arm-linux-gnueabihf/nss/"});
// Exclude linux-aarch64 at the moment until the following bug is fixed:
// 8296631: NSS tests failing on OL9 linux-aarch64 hosts
// osMap.put("Linux-aarch64-64", new String[] {
// "/usr/lib/aarch64-linux-gnu/",
// "/usr/lib/aarch64-linux-gnu/nss/",
// "/usr/lib64/" });
osMap.put("Linux-aarch64-64", new String[] {
"/usr/lib/aarch64-linux-gnu/",
"/usr/lib/aarch64-linux-gnu/nss/",
"/usr/lib64/" });
return osMap;
}

Expand Down Expand Up @@ -910,14 +908,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 @@ -98,6 +98,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.
9 changes: 7 additions & 2 deletions test/jdk/sun/security/pkcs11/Secmod/pkcs11.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
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 not shown.
Binary file added test/jdk/sun/security/pkcs11/tls/tls12/key4.db
Binary file not shown.
9 changes: 9 additions & 0 deletions test/jdk/sun/security/pkcs11/tls/tls12/pkcs11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
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,FIPS

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

1 comment on commit c21a12d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.