You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2014/12/12 12:44:53 UTC
cxf git commit: Get keyPasswordCallbackHandler working with
"resources"
Repository: cxf
Updated Branches:
refs/heads/master e80d3da76 -> b18a2bad6
Get keyPasswordCallbackHandler working with "resources"
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b18a2bad
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b18a2bad
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b18a2bad
Branch: refs/heads/master
Commit: b18a2bad64c343520795175cf377cdf1b981da2a
Parents: e80d3da
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Fri Dec 12 11:44:36 2014 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Fri Dec 12 11:44:36 2014 +0000
----------------------------------------------------------------------
.../apache/cxf/configuration/jsse/TLSParameterJaxBUtils.java | 6 +++++-
.../org/apache/cxf/systest/https/jaxws-publish-callback.xml | 4 ++--
2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/b18a2bad/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 f936d84..e1d4387 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
@@ -302,7 +302,11 @@ public final class TLSParameterJaxBUtils {
if (ch == null) {
return null;
}
- PasswordCallback pwCb = new PasswordCallback(kmc.getKeyStore().getFile(), false);
+ String prompt = kmc.getKeyStore().getFile();
+ if (prompt == null) {
+ prompt = kmc.getKeyStore().getResource();
+ }
+ PasswordCallback pwCb = new PasswordCallback(prompt, false);
PasswordCallback[] callbacks = new PasswordCallback[] {pwCb};
ch.handle(callbacks);
keyPass = callbacks[0].getPassword();
http://git-wip-us.apache.org/repos/asf/cxf/blob/b18a2bad/systests/transports/src/test/resources/org/apache/cxf/systest/https/jaxws-publish-callback.xml
----------------------------------------------------------------------
diff --git a/systests/transports/src/test/resources/org/apache/cxf/systest/https/jaxws-publish-callback.xml b/systests/transports/src/test/resources/org/apache/cxf/systest/https/jaxws-publish-callback.xml
index 8228d10..397e8c9 100644
--- a/systests/transports/src/test/resources/org/apache/cxf/systest/https/jaxws-publish-callback.xml
+++ b/systests/transports/src/test/resources/org/apache/cxf/systest/https/jaxws-publish-callback.xml
@@ -54,10 +54,10 @@ under the License.
<http:conduit name="{http://apache.org/hello_world/services}HttpsPort.http-conduit">
<http:tlsClientParameters disableCNCheck="true">
<sec:keyManagers keyPasswordCallbackHandler="org.apache.cxf.systest.https.KeyPasswordCallbackHandler">
- <sec:keyStore type="JKS" password="password" file="src/test/resources/keys/Morpit.jks"/>
+ <sec:keyStore type="JKS" password="password" resource="keys/Morpit.jks"/>
</sec:keyManagers>
<sec:trustManagers>
- <sec:keyStore type="JKS" password="password" file="src/test/resources/keys/Truststore.jks"/>
+ <sec:keyStore type="JKS" password="password" resource="keys/Truststore.jks"/>
</sec:trustManagers>
</http:tlsClientParameters>
</http:conduit>