Skip to content

Commit e16a01c

Browse files
Test changes
1 parent 046ca00 commit e16a01c

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

closed/test/jdk/openj9/internal/security/TestConstraints.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,13 @@
5151

5252
import jdk.test.lib.process.OutputAnalyzer;
5353
import jdk.test.lib.process.ProcessTools;
54-
import openj9.internal.security.RestrictedSecurity;
5554

5655
public class TestConstraints {
5756

58-
private static getInstances() {
57+
private static void getInstances() {
5958
CertificateFactory.getInstance("X.509");
60-
CertStore.getInstance("Collection");
61-
Configuration.getInstance("JavaLoginConfig");
59+
//CertStore.getInstance("Collection");
60+
//Configuration.getInstance("JavaLoginConfig");
6261
CertPathValidator.getInstance("PKIX");
6362
MessageDigest.getInstance("SHA-256");
6463
KeyStore.getInstance("PKCS12");
@@ -83,7 +82,7 @@ private static getInstances() {
8382
@Test
8483
public void runWithConstraints() {
8584
OutputAnalyzer outputAnalyzer = ProcessTools.executeTestJava(
86-
"-Dsemeru.customprofile=" + RestrictedSecurity.TestConstraints.Version,
85+
"-Dsemeru.customprofile=RestrictedSecurity.TestConstraints.Version",
8786
"-Djava.security.properties=" + System.getProperty("test.src") + "/constraints-java.security",
8887
"TestProperties"
8988
);

closed/test/jdk/openj9/internal/security/constraints-java.security

+8-5
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,15 @@ RestrictedSecurity.TestConstraints.Version.jce.provider.3 = com.sun.crypto.provi
4646
{KDF, HKDF-SHA256, *, FullClassName:TestConstraints}, \
4747
{SecretKeyFactory, PBEWithMD5AndDES, *, FullClassName:TestConstraints}, \
4848
{Mac, HmacSHA256, *, FullClassName:TestConstraints}, \
49-
{AlgorithmParameters, PBES2, *, "sun.security.pkcs12.PKCS12KeyStore"}, \
50-
{AlgorithmParameters, PBEWithHmacSHA256AndAES_256, *, "sun.security.pkcs12.PKCS12KeyStore"}, \
51-
{SecretKeyFactory, PBEWithMD5AndDES, *, "sun.security.pkcs12.PKCS12KeyStore"}, \
52-
{Cipher, PBEWithHmacSHA256AndAES_256, *, "sun.security.pkcs12.PKCS12KeyStore"}, \
53-
{Mac, HmacPBESHA256, *, "sun.security.pkcs12.PKCS12KeyStore"}]
49+
{AlgorithmParameters, PBES2, *, ModuleAndFullClassName:java.base/sun.security.pkcs12.PKCS12KeyStore}, \
50+
{AlgorithmParameters, PBEWithHmacSHA256AndAES_256, *, ModuleAndFullClassName:java.base/sun.security.pkcs12.PKCS12KeyStore}, \
51+
{SecretKeyFactory, PBEWithMD5AndDES, *, ModuleAndFullClassName:java.base/sun.security.pkcs12.PKCS12KeyStore}, \
52+
{Cipher, PBEWithHmacSHA256AndAES_256, *, ModuleAndFullClassName:java.base/sun.security.pkcs12.PKCS12KeyStore}, \
53+
{Mac, HmacPBESHA256, *, ModuleAndFullClassName:java.base/sun.security.pkcs12.PKCS12KeyStore}]
5454
RestrictedSecurity.TestConstraints.Version.jce.provider.4 = sun.security.ssl.SunJSSE [ \
5555
{KeyManagerFactory, SunX509, *, FullClassName:TestConstraints}, \
5656
{TrustManagerFactory, SunX509, *, FullClassName:TestConstraints}, \
5757
{SSLContext, TLSv1.3, *, FullClassName:TestConstraints}]
58+
59+
RestrictedSecurity.TestConstraints.Version.securerandom.provider = SUN
60+
RestrictedSecurity.TestConstraints.Version.securerandom.algorithm = SHA512DRBG

0 commit comments

Comments
 (0)