Skip to content

Commit d7fbec4

Browse files
committed
Update
1 parent bfc2005 commit d7fbec4

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -638,20 +638,20 @@ private static void restrictsCheck() {
638638
}
639639
} else if (expireMonths <= 0) { // Check if the SunsetDate expired.
640640
if (ignoreSunsetExpiration) {
641-
System.err.println("The requested restricted security profile " + restricts.profileID
641+
System.err.format("The requested restricted security profile " + restricts.profileID
642642
+ " expired on " + restricts.descSunsetDate
643-
+ ": certified cryptography use cannot be guaranteed."
644-
+ " Use -Dsemeru.restrictedsecurity.suppresssunsetwarning to stop displaying this message."
645-
+ " The -Dsemeru.restrictedsecurity.ignoresunsetexpiration option has been specified."
646-
+ " WARNING: java will start with the requested restricted security profile but uncertified"
643+
+ ": Certified cryptography use cannot be guaranteed.%n"
644+
+ " Use -Dsemeru.restrictedsecurity.suppresssunsetwarning to stop displaying this message.%n"
645+
+ " The -Dsemeru.restrictedsecurity.ignoresunsetexpiration option has been specified.%n"
646+
+ " WARNING: Java will start with the requested restricted security profile but uncertified"
647647
+ " cryptography may be active.");
648648
} else {
649-
printStackTraceAndExit("The requested restricted security profile " + restricts.profileID
649+
printStackTraceAndExit(String.format("The requested restricted security profile " + restricts.profileID
650650
+ " expired on " + restricts.descSunsetDate
651-
+ ": java will stop because certified cryptography use cannot be guaranteed."
652-
+ " Use -Dsemeru.restrictedsecurity.suppresssunsetwarning to stop displaying this message."
651+
+ ": Java will stop because certified cryptography use cannot be guaranteed.%n"
652+
+ " Use -Dsemeru.restrictedsecurity.suppresssunsetwarning to stop displaying this message.%n"
653653
+ " Use -Dsemeru.restrictedsecurity.ignoresunsetexpiration to allow java to start while"
654-
+ " possibly using uncertified cryptography.");
654+
+ " possibly using uncertified cryptography."));
655655
}
656656
} else if (expireMonths <= 6) { // Check if the SunsetDate will expire within 6 months.
657657
System.err.println("The restricted security profile " + restricts.profileID

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private static Stream<Arguments> patternMatches_testPolicySunset() {
7979
Arguments.of("Test-Profile-PolicySunset-Expired",
8080
propertyFile,
8181
"=false", "=true",
82-
"WARNING: java will start with the requested restricted security profile but uncertified cryptography may be active",
82+
"WARNING: Java will start with the requested restricted security profile but uncertified cryptography may be active",
8383
0),
8484
// 2 - expired; suppress=true; ignore=true, no warning
8585
Arguments.of("Test-Profile-PolicySunset-Expired",
@@ -115,7 +115,7 @@ private static Stream<Arguments> patternMatches_testPolicySunset() {
115115
Arguments.of("Test-Profile-PolicySunset-Expired",
116116
propertyFile,
117117
null, "=true",
118-
"WARNING: java will start with the requested restricted security profile but uncertified cryptography may be active",
118+
"WARNING: Java will start with the requested restricted security profile but uncertified cryptography may be active",
119119
0),
120120
// 8 - expired; suppress=false; ignore=false
121121
Arguments.of("Test-Profile-PolicySunset-Expired",
@@ -161,7 +161,7 @@ public void shouldContain_testPolicySunset(String customprofile, String security
161161
}
162162
args.add("TestPolicySunset");
163163

164-
OutputAnalyzer outputAnalyzer = ProcessTools.executeTestJava(args.toArray(new String[0]));
164+
OutputAnalyzer outputAnalyzer = ProcessTools.executeTestJava(args);
165165
outputAnalyzer.reportDiagnosticSummary();
166166
outputAnalyzer.shouldHaveExitValue(exitValue).shouldMatch(expected);
167167
}

0 commit comments

Comments
 (0)