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