|
32 | 32 |
|
33 | 33 | import jdk.internal.event.EventHelper; |
34 | 34 | import jdk.internal.event.SecurityPropertyModificationEvent; |
| 35 | +import jdk.internal.misc.JavaSecuritySystemConfiguratorAccess; |
35 | 36 | import jdk.internal.misc.SharedSecrets; |
36 | 37 | import jdk.internal.util.StaticProperty; |
37 | 38 | import sun.security.util.Debug; |
@@ -74,6 +75,15 @@ private static class ProviderProperty { |
74 | 75 | } |
75 | 76 |
|
76 | 77 | static { |
| 78 | + // Initialise here as used by code with system properties disabled |
| 79 | + SharedSecrets.setJavaSecuritySystemConfiguratorAccess( |
| 80 | + new JavaSecuritySystemConfiguratorAccess() { |
| 81 | + @Override |
| 82 | + public boolean isSystemFipsEnabled() { |
| 83 | + return SystemConfigurator.isSystemFipsEnabled(); |
| 84 | + } |
| 85 | + }); |
| 86 | + |
77 | 87 | // doPrivileged here because there are multiple |
78 | 88 | // things in initialize that might require privs. |
79 | 89 | // (the FileInputStream call and the File.exists call, |
@@ -193,9 +203,8 @@ private static void initialize() { |
193 | 203 | } |
194 | 204 |
|
195 | 205 | String disableSystemProps = System.getProperty("java.security.disableSystemPropertiesFile"); |
196 | | - if (disableSystemProps == null && |
197 | | - "true".equalsIgnoreCase(props.getProperty |
198 | | - ("security.useSystemPropertiesFile"))) { |
| 206 | + if ((disableSystemProps == null || "false".equalsIgnoreCase(disableSystemProps)) && |
| 207 | + "true".equalsIgnoreCase(props.getProperty("security.useSystemPropertiesFile"))) { |
199 | 208 | if (SystemConfigurator.configure(props)) { |
200 | 209 | loadedProps = true; |
201 | 210 | } |
|
0 commit comments