1 |
diff --git openjdk.orig/src/java.base/share/classes/java/security/Security.java openjdk/src/java.base/share/classes/java/security/Security.java |
2 |
--- openjdk.orig/src/java.base/share/classes/java/security/Security.java |
3 |
+++ openjdk/src/java.base/share/classes/java/security/Security.java |
4 |
@@ -32,6 +32,7 @@ |
5 |
|
6 |
import jdk.internal.event.EventHelper; |
7 |
import jdk.internal.event.SecurityPropertyModificationEvent; |
8 |
+import jdk.internal.misc.JavaSecuritySystemConfiguratorAccess; |
9 |
import jdk.internal.access.SharedSecrets; |
10 |
import jdk.internal.util.StaticProperty; |
11 |
import sun.security.util.Debug; |
12 |
@@ -74,6 +75,15 @@ |
13 |
} |
14 |
|
15 |
static { |
16 |
+ // Initialise here as used by code with system properties disabled |
17 |
+ SharedSecrets.setJavaSecuritySystemConfiguratorAccess( |
18 |
+ new JavaSecuritySystemConfiguratorAccess() { |
19 |
+ @Override |
20 |
+ public boolean isSystemFipsEnabled() { |
21 |
+ return SystemConfigurator.isSystemFipsEnabled(); |
22 |
+ } |
23 |
+ }); |
24 |
+ |
25 |
// doPrivileged here because there are multiple |
26 |
// things in initialize that might require privs. |
27 |
// (the FileInputStream call and the File.exists call, |
28 |
@@ -193,9 +203,8 @@ |
29 |
} |
30 |
|
31 |
String disableSystemProps = System.getProperty("java.security.disableSystemPropertiesFile"); |
32 |
- if (disableSystemProps == null && |
33 |
- "true".equalsIgnoreCase(props.getProperty |
34 |
- ("security.useSystemPropertiesFile"))) { |
35 |
+ if ((disableSystemProps == null || "false".equalsIgnoreCase(disableSystemProps)) && |
36 |
+ "true".equalsIgnoreCase(props.getProperty("security.useSystemPropertiesFile"))) { |
37 |
if (SystemConfigurator.configure(props)) { |
38 |
loadedProps = true; |
39 |
} |
40 |
diff --git openjdk.orig/src/java.base/share/classes/java/security/SystemConfigurator.java openjdk/src/java.base/share/classes/java/security/SystemConfigurator.java |
41 |
--- openjdk.orig/src/java.base/share/classes/java/security/SystemConfigurator.java |
42 |
+++ openjdk/src/java.base/share/classes/java/security/SystemConfigurator.java |
43 |
@@ -38,8 +38,6 @@ |
44 |
import java.util.Properties; |
45 |
import java.util.regex.Pattern; |
46 |
|
47 |
-import jdk.internal.misc.SharedSecrets; |
48 |
-import jdk.internal.misc.JavaSecuritySystemConfiguratorAccess; |
49 |
import sun.security.util.Debug; |
50 |
|
51 |
/** |
52 |
@@ -65,16 +63,6 @@ |
53 |
|
54 |
private static boolean systemFipsEnabled = false; |
55 |
|
56 |
- static { |
57 |
- SharedSecrets.setJavaSecuritySystemConfiguratorAccess( |
58 |
- new JavaSecuritySystemConfiguratorAccess() { |
59 |
- @Override |
60 |
- public boolean isSystemFipsEnabled() { |
61 |
- return SystemConfigurator.isSystemFipsEnabled(); |
62 |
- } |
63 |
- }); |
64 |
- } |
65 |
- |
66 |
/* |
67 |
* Invoked when java.security.Security class is initialized, if |
68 |
* java.security.disableSystemPropertiesFile property is not set and |