[1/3] cxf git commit: Recording .gitmergeinfo Changes

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[1/3] cxf git commit: Recording .gitmergeinfo Changes

coheigea
Administrator
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 15aa0d6ca -> ed2b69ec9


Recording .gitmergeinfo Changes


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ac280e8b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ac280e8b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ac280e8b

Branch: refs/heads/3.1.x-fixes
Commit: ac280e8bd060998f39084f54ce6317c4f41fef36
Parents: 6e7c86d
Author: Colm O hEigeartaigh <[hidden email]>
Authored: Fri Feb 17 13:46:22 2017 +0000
Committer: Colm O hEigeartaigh <[hidden email]>
Committed: Fri Feb 17 13:46:22 2017 +0000

----------------------------------------------------------------------
 .gitmergeinfo | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/ac280e8b/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 9b5dd79..37cdcfd 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -289,6 +289,7 @@ M 11637433df089a638e173d1ef57441e7456cf2ea
 M 1184e08f0d1c40c754e39fd5d6340d1057fbdd17
 M 11e18bf5622cafdb10723cee895885d676b35a7b
 M 146b00d1947058705c873dffe2ba78ad35c8b03c
+M 19a4d72a32f1e18bec621af403ecdf21d97453af
 M 19d8da7f0672b86dbf88a08b54a72297d0ca2d20
 M 1afeea8bdc0ef96df1d52ea343957dc396723f8c
 M 20d0a2811c15cb65a402eb063e1359236d7014ea

Reply | Threaded
Open this post in threaded view
|

[2/3] cxf git commit: CXF-7252 - TLSParameterJaxBUtils.getTrustManagers getting password from wrong system property

coheigea
Administrator
CXF-7252 - TLSParameterJaxBUtils.getTrustManagers getting password from wrong system property

# Conflicts:
# core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
# core/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterJaxBUtils.java


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/6e7c86d2
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/6e7c86d2
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/6e7c86d2

Branch: refs/heads/3.1.x-fixes
Commit: 6e7c86d202f19a6159ee7c7b888504f39a65090b
Parents: 15aa0d6
Author: Colm O hEigeartaigh <[hidden email]>
Authored: Fri Feb 17 13:44:40 2017 +0000
Committer: Colm O hEigeartaigh <[hidden email]>
Committed: Fri Feb 17 13:46:22 2017 +0000

----------------------------------------------------------------------
 .../apache/cxf/configuration/jsse/SSLUtils.java | 44 ++++++++++++++++++++
 .../jsse/TLSParameterJaxBUtils.java             | 35 +++++++++++++---
 2 files changed, 74 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/6e7c86d2/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java b/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
index 4132b35..71f24fd 100644
--- a/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
+++ b/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
@@ -559,14 +559,23 @@ public final class SSLUtils {
     }
     
     public static String getTrustStoreType(String trustStoreType, Logger log) {
+        return getTrustStoreType(trustStoreType, log, DEFAULT_TRUST_STORE_TYPE);
+    }
+
+    public static String getTrustStoreType(String trustStoreType, Logger log, String def) {
         String logMsg = null;
         if (trustStoreType != null) {
             logMsg = "TRUST_STORE_TYPE_SET";
         } else {
             //Can default to JKS
             trustStoreType = SystemPropertyAction.getProperty("javax.net.ssl.trustStoreType");
+<<<<<<< HEAD
             if (trustStoreType == null) {    
                 trustStoreType = DEFAULT_TRUST_STORE_TYPE;
+=======
+            if (trustStoreType == null) {
+                trustStoreType = def;
+>>>>>>> 19a4d72... CXF-7252 - TLSParameterJaxBUtils.getTrustManagers getting password from wrong system property
                 logMsg = "TRUST_STORE_TYPE_NOT_SET";
             } else {
                 logMsg = "TRUST_STORE_TYPE_SYSTEM_SET";
@@ -576,6 +585,41 @@ public final class SSLUtils {
         return trustStoreType;
     }
     
+<<<<<<< HEAD
+=======
+    public static String getTruststorePassword(String trustStorePassword,
+                                             Logger log) {
+        String logMsg = null;
+        if (trustStorePassword != null) {
+            logMsg = "TRUST_STORE_PASSWORD_SET";
+        } else {
+            trustStorePassword =
+                SystemPropertyAction.getProperty("javax.net.ssl.trustStorePassword");
+            logMsg = trustStorePassword != null
+                     ? "TRUST_STORE_PASSWORD_SYSTEM_PROPERTY_SET"
+                     : "TRUST_STORE_PASSWORD_NOT_SET";
+        }
+        LogUtils.log(log, Level.FINE, logMsg);
+        return trustStorePassword;
+    }
+    
+    public static String getTruststoreProvider(String trustStoreProvider, Logger log) {
+        String logMsg = null;
+        if (trustStoreProvider != null) {
+            logMsg = "TRUST_STORE_PROVIDER_SET";
+        } else {
+            trustStoreProvider = SystemPropertyAction.getProperty("javax.net.ssl.trustStoreProvider", null);
+            if (trustStoreProvider == null) {
+                logMsg = "TRUST_STORE_PROVIDER_NOT_SET";
+            } else {
+                logMsg = "TRUST_STORE_PROVIDER_SYSTEM_SET";
+            }
+        }
+        LogUtils.log(log, Level.FINE, logMsg, trustStoreProvider);
+        return trustStoreProvider;
+    }
+
+>>>>>>> 19a4d72... CXF-7252 - TLSParameterJaxBUtils.getTrustManagers getting password from wrong system property
     public static String getSecureSocketProtocol(String secureSocketProtocol,
                                                  Logger log) {
         if (secureSocketProtocol != null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/6e7c86d2/core/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterJaxBUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterJaxBUtils.java b/core/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterJaxBUtils.java
index e8743b7..44eca7b 100644
--- a/core/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterJaxBUtils.java
+++ b/core/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterJaxBUtils.java
@@ -95,31 +95,56 @@ public final class TLSParameterJaxBUtils {
         }
         return secureRandom;
     }
+
+    public static KeyStore getKeyStore(KeyStoreType kst) throws GeneralSecurityException, IOException {
+        return getKeyStore(kst, false);
+    }
+
     /**
      * This method converts a JAXB generated KeyStoreType into a KeyStore.
      */
-    public static KeyStore getKeyStore(KeyStoreType kst)
+    public static KeyStore getKeyStore(KeyStoreType kst, boolean trustStore)
         throws GeneralSecurityException,
                IOException {
 
         if (kst == null) {
             return null;
         }
-        String type = SSLUtils.getKeystoreType(kst.isSetType()
+        String type = null;
+        if (trustStore) {
+            type = SSLUtils.getTrustStoreType(kst.isSetType()
+                                     ? kst.getType() : null, LOG, KeyStore.getDefaultType());
+        } else {
+            type = SSLUtils.getKeystoreType(kst.isSetType()
                                  ? kst.getType() : null, LOG, KeyStore.getDefaultType());
+        }
 
         char[] password = kst.isSetPassword()
                     ? deobfuscate(kst.getPassword())
                     : null;
         if (password == null) {
-            String tmp = SSLUtils.getKeystorePassword(null, LOG);
+            String tmp = null;
+            if (trustStore) {
+                tmp = SSLUtils.getTruststorePassword(null, LOG);
+            } else {
+                tmp = SSLUtils.getKeystorePassword(null, LOG);
+            }
             if (tmp != null) {
                 password = tmp.toCharArray();
             }
         }
+<<<<<<< HEAD
         String provider = SSLUtils.getKeystoreProvider(kst.isSetProvider()
                                                        ? kst.getProvider() : null,
                                                        LOG);
+=======
+        String provider = null;
+        if (trustStore) {
+            provider = SSLUtils.getTruststoreProvider(kst.isSetProvider() ? kst.getProvider() : null, LOG);
+        } else {
+            provider = SSLUtils.getKeystoreProvider(kst.isSetProvider() ? kst.getProvider() : null, LOG);
+        }
+>>>>>>> 19a4d72... CXF-7252 - TLSParameterJaxBUtils.getTrustManagers getting password from wrong system property
         KeyStore keyStore = provider == null
                     ? KeyStore.getInstance(type)
                     : KeyStore.getInstance(type, provider);
@@ -256,7 +281,7 @@ public final class TLSParameterJaxBUtils {
         throws GeneralSecurityException,
                IOException {
 
-        KeyStore keyStore = getKeyStore(kmc.getKeyStore());
+        KeyStore keyStore = getKeyStore(kmc.getKeyStore(), false);
 
         String alg = kmc.isSetFactoryAlgorithm()
                      ? kmc.getFactoryAlgorithm()
@@ -316,7 +341,7 @@ public final class TLSParameterJaxBUtils {
 
         final KeyStore keyStore =
             tmc.isSetKeyStore()
-                ? getKeyStore(tmc.getKeyStore())
+                ? getKeyStore(tmc.getKeyStore(), true)
                 : (tmc.isSetCertStore()
                     ? getKeyStore(tmc.getCertStore())
                     : (KeyStore) null);

Reply | Threaded
Open this post in threaded view
|

[3/3] cxf git commit: Fixing merge

coheigea
Administrator
In reply to this post by coheigea
Fixing merge


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ed2b69ec
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ed2b69ec
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ed2b69ec

Branch: refs/heads/3.1.x-fixes
Commit: ed2b69ec9b6e50790845a2ae7dd48875acb66b74
Parents: ac280e8
Author: Colm O hEigeartaigh <[hidden email]>
Authored: Fri Feb 17 13:47:56 2017 +0000
Committer: Colm O hEigeartaigh <[hidden email]>
Committed: Fri Feb 17 13:47:56 2017 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/configuration/jsse/SSLUtils.java     | 8 --------
 .../apache/cxf/configuration/jsse/TLSParameterJaxBUtils.java | 6 ------
 2 files changed, 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/ed2b69ec/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java b/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
index 71f24fd..fb9556d 100644
--- a/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
+++ b/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
@@ -569,13 +569,8 @@ public final class SSLUtils {
         } else {
             //Can default to JKS
             trustStoreType = SystemPropertyAction.getProperty("javax.net.ssl.trustStoreType");
-<<<<<<< HEAD
-            if (trustStoreType == null) {    
-                trustStoreType = DEFAULT_TRUST_STORE_TYPE;
-=======
             if (trustStoreType == null) {
                 trustStoreType = def;
->>>>>>> 19a4d72... CXF-7252 - TLSParameterJaxBUtils.getTrustManagers getting password from wrong system property
                 logMsg = "TRUST_STORE_TYPE_NOT_SET";
             } else {
                 logMsg = "TRUST_STORE_TYPE_SYSTEM_SET";
@@ -585,8 +580,6 @@ public final class SSLUtils {
         return trustStoreType;
     }
     
-<<<<<<< HEAD
-=======
     public static String getTruststorePassword(String trustStorePassword,
                                              Logger log) {
         String logMsg = null;
@@ -619,7 +612,6 @@ public final class SSLUtils {
         return trustStoreProvider;
     }
 
->>>>>>> 19a4d72... CXF-7252 - TLSParameterJaxBUtils.getTrustManagers getting password from wrong system property
     public static String getSecureSocketProtocol(String secureSocketProtocol,
                                                  Logger log) {
         if (secureSocketProtocol != null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed2b69ec/core/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterJaxBUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterJaxBUtils.java b/core/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterJaxBUtils.java
index 44eca7b..8050e38 100644
--- a/core/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterJaxBUtils.java
+++ b/core/src/main/java/org/apache/cxf/configuration/jsse/TLSParameterJaxBUtils.java
@@ -133,18 +133,12 @@ public final class TLSParameterJaxBUtils {
                 password = tmp.toCharArray();
             }
         }
-<<<<<<< HEAD
-        String provider = SSLUtils.getKeystoreProvider(kst.isSetProvider()
-                                                       ? kst.getProvider() : null,
-                                                       LOG);
-=======
         String provider = null;
         if (trustStore) {
             provider = SSLUtils.getTruststoreProvider(kst.isSetProvider() ? kst.getProvider() : null, LOG);
         } else {
             provider = SSLUtils.getKeystoreProvider(kst.isSetProvider() ? kst.getProvider() : null, LOG);
         }
->>>>>>> 19a4d72... CXF-7252 - TLSParameterJaxBUtils.getTrustManagers getting password from wrong system property
         KeyStore keyStore = provider == null
                     ? KeyStore.getInstance(type)
                     : KeyStore.getInstance(type, provider);