From f19a0af3af9f18b0107ea5f78666a4c0d35cf9e2 Mon Sep 17 00:00:00 2001 From: JinhangZhang Date: Fri, 23 Aug 2024 14:27:00 -0400 Subject: [PATCH] u --- test/jdk/javax/net/ssl/FIPSFlag/FIPSFlagTests.java | 12 ++++++------ test/jdk/javax/net/ssl/FIPSFlag/TestFIPS.java | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/test/jdk/javax/net/ssl/FIPSFlag/FIPSFlagTests.java b/test/jdk/javax/net/ssl/FIPSFlag/FIPSFlagTests.java index 71f3af09f00..0038d53a4fb 100644 --- a/test/jdk/javax/net/ssl/FIPSFlag/FIPSFlagTests.java +++ b/test/jdk/javax/net/ssl/FIPSFlag/FIPSFlagTests.java @@ -24,17 +24,17 @@ /* * @test * @summary Test flags used for FIPS 140-2 and FIPS 140-3 - * @run + * @run main/othervm * -Dsemeru.fips=true - * -Dsemeru.comstomprofile=OpenJCEPlusFIPS.FIPS140-3 + * -Dsemeru.customprofile=OpenJCEPlusFIPS.FIPS140-3 * TestFIPS true 140-3 - * @run + * @run main/othervm * -Dsemeru.fips=true - * -Dsemeru.comstomprofile=OpenJCEPlusFIPS + * -Dsemeru.customprofile=OpenJCEPlusFIPS * TestFIPS true 140-3 - * @run + * @run main/othervm * -Dsemeru.fips=true * TestFIPS true 140-2 - * @run + * @run main/othervm * TestFIPS false */ \ No newline at end of file diff --git a/test/jdk/javax/net/ssl/FIPSFlag/TestFIPS.java b/test/jdk/javax/net/ssl/FIPSFlag/TestFIPS.java index 2878eee740f..66ceeb973f9 100644 --- a/test/jdk/javax/net/ssl/FIPSFlag/TestFIPS.java +++ b/test/jdk/javax/net/ssl/FIPSFlag/TestFIPS.java @@ -27,14 +27,20 @@ public class TestFIPS { private static final String SEMERU_FIPS = System.getProperty("semeru.fips"); + private static final String PROFILE = System.getProperty("semeru.customprofile"); public static void main(String[] args) throws Exception { + System.setProperty("semeru.customprofile", "OpenJCEPlusFIPS.FIPS140-3-Weakly-Enforced"); + for (Provider.Service service : Security.getProvider("SUN").getServices()) { System.out.println(" Service: " + service.getType() + " Algorithm: " + service.getAlgorithm() + " Class: " + service.getClassName()); } + System.out.println("com.ibm.fips.mode: " + System.getProperty("com.ibm.fips.mode")); + System.out.println(" is: " + System.getProperty("semeru.customprofile")); + if (SEMERU_FIPS == null) { if (args.length == 1 && args[0].equals("false")) { System.out.println("PASS");