Blame SOURCES/rh1915071-always_initialise_configurator_access.patch

700dcb
diff --git openjdk.orig/src/java.base/share/classes/java/security/Security.java openjdk/src/java.base/share/classes/java/security/Security.java
700dcb
--- openjdk.orig/src/java.base/share/classes/java/security/Security.java
700dcb
+++ openjdk/src/java.base/share/classes/java/security/Security.java
700dcb
@@ -32,6 +32,7 @@
700dcb
 
700dcb
 import jdk.internal.event.EventHelper;
700dcb
 import jdk.internal.event.SecurityPropertyModificationEvent;
700dcb
+import jdk.internal.misc.JavaSecuritySystemConfiguratorAccess;
700dcb
 import jdk.internal.misc.SharedSecrets;
700dcb
 import jdk.internal.util.StaticProperty;
700dcb
 import sun.security.util.Debug;
700dcb
@@ -74,6 +75,15 @@
700dcb
     }
700dcb
 
700dcb
     static {
700dcb
+        // Initialise here as used by code with system properties disabled
700dcb
+        SharedSecrets.setJavaSecuritySystemConfiguratorAccess(
700dcb
+            new JavaSecuritySystemConfiguratorAccess() {
700dcb
+                @Override
700dcb
+                public boolean isSystemFipsEnabled() {
700dcb
+                    return SystemConfigurator.isSystemFipsEnabled();
700dcb
+                }
700dcb
+            });
700dcb
+
700dcb
         // doPrivileged here because there are multiple
700dcb
         // things in initialize that might require privs.
700dcb
         // (the FileInputStream call and the File.exists call,
700dcb
@@ -193,9 +203,8 @@
700dcb
         }
700dcb
 
700dcb
         String disableSystemProps = System.getProperty("java.security.disableSystemPropertiesFile");
700dcb
-        if (disableSystemProps == null &&
700dcb
-            "true".equalsIgnoreCase(props.getProperty
700dcb
-                ("security.useSystemPropertiesFile"))) {
700dcb
+        if ((disableSystemProps == null || "false".equalsIgnoreCase(disableSystemProps)) &&
700dcb
+            "true".equalsIgnoreCase(props.getProperty("security.useSystemPropertiesFile"))) {
700dcb
             if (SystemConfigurator.configure(props)) {
700dcb
                 loadedProps = true;
700dcb
             }
700dcb
diff --git openjdk.orig/src/java.base/share/classes/java/security/SystemConfigurator.java openjdk/src/java.base/share/classes/java/security/SystemConfigurator.java
700dcb
--- openjdk.orig/src/java.base/share/classes/java/security/SystemConfigurator.java
700dcb
+++ openjdk/src/java.base/share/classes/java/security/SystemConfigurator.java
700dcb
@@ -38,8 +38,6 @@
700dcb
 import java.util.Properties;
700dcb
 import java.util.regex.Pattern;
700dcb
 
700dcb
-import jdk.internal.misc.SharedSecrets;
700dcb
-import jdk.internal.misc.JavaSecuritySystemConfiguratorAccess;
700dcb
 import sun.security.util.Debug;
700dcb
 
700dcb
 /**
700dcb
@@ -65,16 +63,6 @@
700dcb
 
700dcb
     private static boolean systemFipsEnabled = false;
700dcb
 
700dcb
-    static {
700dcb
-        SharedSecrets.setJavaSecuritySystemConfiguratorAccess(
700dcb
-            new JavaSecuritySystemConfiguratorAccess() {
700dcb
-                @Override
700dcb
-                public boolean isSystemFipsEnabled() {
700dcb
-                    return SystemConfigurator.isSystemFipsEnabled();
700dcb
-                }
700dcb
-            });
700dcb
-    }
700dcb
-
700dcb
     /*
700dcb
      * Invoked when java.security.Security class is initialized, if
700dcb
      * java.security.disableSystemPropertiesFile property is not set and