Skip to content

Commit

Permalink
u
Browse files Browse the repository at this point in the history
  • Loading branch information
JinhangZhang committed Aug 23, 2024
1 parent 97190d6 commit f19a0af
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/jdk/javax/net/ssl/FIPSFlag/FIPSFlagTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
6 changes: 6 additions & 0 deletions test/jdk/javax/net/ssl/FIPSFlag/TestFIPS.java
Original file line number Diff line number Diff line change
Expand Up @@ -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("<Customprofile> is: " + System.getProperty("semeru.customprofile"));

if (SEMERU_FIPS == null) {
if (args.length == 1 && args[0].equals("false")) {
System.out.println("PASS");
Expand Down

0 comments on commit f19a0af

Please sign in to comment.