Blame SOURCES/rh1906862-always_initialise_configurator_access.patch

5b7429
# HG changeset patch
5b7429
# User andrew
5b7429
# Date 1608219816 0
5b7429
#      Thu Dec 17 15:43:36 2020 +0000
5b7429
# Node ID db5d1b28bfce04352b3a48960bf836f6eb20804b
5b7429
# Parent  a2cfa397150e99b813354226d536eb8509b5850b
5b7429
RH1906862: Always initialise JavaSecuritySystemConfiguratorAccess
5b7429
5b7429
diff --git openjdk.orig/jdk/src/share/classes/java/security/Security.java openjdk/jdk/src/share/classes/java/security/Security.java
5b7429
--- openjdk.orig/jdk/src/share/classes/java/security/Security.java
5b7429
+++ openjdk/jdk/src/share/classes/java/security/Security.java
5b7429
@@ -30,6 +30,8 @@
5b7429
 import java.util.concurrent.ConcurrentHashMap;
5b7429
 import java.io.*;
5b7429
 import java.net.URL;
5b7429
+import sun.misc.SharedSecrets;
5b7429
+import sun.misc.JavaSecuritySystemConfiguratorAccess;
5b7429
 import sun.security.util.Debug;
5b7429
 import sun.security.util.PropertyExpander;
5b7429
 
5b7429
@@ -69,6 +71,15 @@
5b7429
     }
5b7429
 
5b7429
     static {
5b7429
+        // Initialise here as used by code with system properties disabled
5b7429
+        SharedSecrets.setJavaSecuritySystemConfiguratorAccess(
5b7429
+            new JavaSecuritySystemConfiguratorAccess() {
5b7429
+                @Override
5b7429
+                public boolean isSystemFipsEnabled() {
5b7429
+                    return SystemConfigurator.isSystemFipsEnabled();
5b7429
+                }
5b7429
+            });
5b7429
+
5b7429
         // doPrivileged here because there are multiple
5b7429
         // things in initialize that might require privs.
5b7429
         // (the FileInputStream call and the File.exists call,
5b7429
diff --git openjdk.orig/jdk/src/share/classes/java/security/SystemConfigurator.java openjdk/jdk/src/share/classes/java/security/SystemConfigurator.java
5b7429
--- openjdk.orig/jdk/src/share/classes/java/security/SystemConfigurator.java
5b7429
+++ openjdk/jdk/src/share/classes/java/security/SystemConfigurator.java
5b7429
@@ -39,8 +39,6 @@
5b7429
 import java.util.Properties;
5b7429
 import java.util.regex.Pattern;
5b7429
 
5b7429
-import sun.misc.SharedSecrets;
5b7429
-import sun.misc.JavaSecuritySystemConfiguratorAccess;
5b7429
 import sun.security.util.Debug;
5b7429
 
5b7429
 /**
5b7429
@@ -66,16 +64,6 @@
5b7429
 
5b7429
     private static boolean systemFipsEnabled = false;
5b7429
 
5b7429
-    static {
5b7429
-        SharedSecrets.setJavaSecuritySystemConfiguratorAccess(
5b7429
-            new JavaSecuritySystemConfiguratorAccess() {
5b7429
-                @Override
5b7429
-                public boolean isSystemFipsEnabled() {
5b7429
-                    return SystemConfigurator.isSystemFipsEnabled();
5b7429
-                }
5b7429
-            });
5b7429
-    }
5b7429
-
5b7429
     /*
5b7429
      * Invoked when java.security.Security class is initialized, if
5b7429
      * java.security.disableSystemPropertiesFile property is not set and