Skip to content

Commit 7629bf7

Browse files
Handle Windows SecureRandom strongAlgorithms defaults in test
Update the test regular expression to match the Windows default value of the `securerandom.strongAlgorithms` security property. The default value on Windows differs from Linux and macOS, causing the existing regular expression to fail even though the property is correctly restored after all `RestrictedSecurity` settings are removed. Update the regular expression to match both the Windows and non-Windows default values. Signed-off-by: Mohit Rajbhar <mohit.rajbhar@ibm.com>
1 parent dd08221 commit 7629bf7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ private static Stream<Arguments> patternMatches_strongAlgorithms() {
223223
// 4 - Test property - securerandom.strongAlgorithms remove algorithm in extended profile.
224224
tests.add(Arguments.of("Test-Profile-strongAlgorithms-Extension_2",
225225
System.getProperty("test.src") + "/property-java.security",
226-
"securerandom\\.strongAlgorithms: (?=.*NativePRNGBlocking:SUN)(?=.*DRBG:SUN)",
226+
"securerandom\\.strongAlgorithms: (NativePRNGBlocking:SUN|Windows-PRNG:SunMSCAPI),DRBG:SUN",
227227
0));
228228
// 5 - Test property - securerandom.strongAlgorithms invalid algorithm.
229229
tests.add(Arguments.of("Test-Profile-strongAlgorithms-InvalidFormat",

0 commit comments

Comments
 (0)