Blame pr3575-rh1567204-system_cacerts_database_handling_no_longer_affect_jssecacerts.patch

Alex Kashchenko d6f9d0
# HG changeset patch
Alex Kashchenko d6f9d0
# User andrew
Alex Kashchenko d6f9d0
# Date 1525111445 -3600
Alex Kashchenko d6f9d0
#      Mon Apr 30 19:04:05 2018 +0100
Alex Kashchenko d6f9d0
# Node ID 388fc8da23044317c160678ffa8ff541c216a255
Alex Kashchenko d6f9d0
# Parent  556adf3a76aa81bf3918d7d46554dae7cc1d5c5c
Alex Kashchenko d6f9d0
PR3575: System cacerts database handling should not affect jssecacerts
Alex Kashchenko d6f9d0
Alex Kashchenko d6f9d0
diff --git openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java openjdk/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java
Alex Kashchenko d6f9d0
--- openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java
Alex Kashchenko d6f9d0
+++ openjdk/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java
Alex Kashchenko d6f9d0
@@ -162,7 +162,7 @@
Alex Kashchenko d6f9d0
          * Try:
Alex Kashchenko d6f9d0
          *      javax.net.ssl.trustStore  (if this variable exists, stop)
Alex Kashchenko d6f9d0
          *      jssecacerts
Alex Kashchenko d6f9d0
-         *      cacerts
Alex Kashchenko d6f9d0
+         *      cacerts (system and local)
Alex Kashchenko d6f9d0
          *
Alex Kashchenko d6f9d0
          * If none exists, we use an empty keystore.
Alex Kashchenko d6f9d0
          */
Alex Kashchenko d6f9d0
@@ -174,14 +174,14 @@
Alex Kashchenko d6f9d0
                     storeFile = new File(storeFileName);
Alex Kashchenko d6f9d0
                     fis = getFileInputStream(storeFile);
Alex Kashchenko d6f9d0
                 } else {
Alex Kashchenko d6f9d0
-                    /* Check system cacerts DB first; /etc/pki/java/cacerts */
Alex Kashchenko d6f9d0
-                    storeFile = new File(sep + "etc" + sep + "pki" + sep
Alex Kashchenko d6f9d0
-                                         + "java" + sep + "cacerts");
Alex Kashchenko d6f9d0
+                    String javaHome = props.get("javaHome");
Alex Kashchenko d6f9d0
+                    storeFile = new File(javaHome + sep + "lib" + sep
Alex Kashchenko d6f9d0
+                                         + "security" + sep +
Alex Kashchenko d6f9d0
+                                         "jssecacerts");
Alex Kashchenko d6f9d0
                     if ((fis = getFileInputStream(storeFile)) == null) {
Alex Kashchenko d6f9d0
-                        String javaHome = props.get("javaHome");
Alex Kashchenko d6f9d0
-                        storeFile = new File(javaHome + sep + "lib" + sep
Alex Kashchenko d6f9d0
-                                             + "security" + sep +
Alex Kashchenko d6f9d0
-                                             "jssecacerts");
Alex Kashchenko d6f9d0
+                        /* Check system cacerts DB first; /etc/pki/java/cacerts */
Alex Kashchenko d6f9d0
+                        storeFile = new File(sep + "etc" + sep + "pki" + sep
Alex Kashchenko d6f9d0
+                                             + "java" + sep + "cacerts");
Alex Kashchenko d6f9d0
                         if ((fis = getFileInputStream(storeFile)) == null) {
Alex Kashchenko d6f9d0
                             storeFile = new File(javaHome + sep + "lib" + sep
Alex Kashchenko d6f9d0
                                                  + "security" + sep +