cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: Allow the password for signing to come from the crypto properties file
Date Thu, 08 Jun 2017 15:26:55 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 091f3288a -> 060a7c132


Allow the password for signing to come from the crypto properties file


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

Branch: refs/heads/3.1.x-fixes
Commit: 060a7c132ad6e155bff8bdeb032b090ba5d1c8d9
Parents: 091f328
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Thu Jun 8 16:17:29 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Thu Jun 8 16:18:08 2017 +0100

----------------------------------------------------------------------
 .../sts/token/provider/AbstractSAMLTokenProvider.java    | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/060a7c13/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/AbstractSAMLTokenProvider.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/AbstractSAMLTokenProvider.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/AbstractSAMLTokenProvider.java
index b5ad4cb..abe0e25 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/AbstractSAMLTokenProvider.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/AbstractSAMLTokenProvider.java
@@ -108,10 +108,13 @@ public abstract class AbstractSAMLTokenProvider {
             }
         }
         // Get the password
-        WSPasswordCallback[] cb = {new WSPasswordCallback(alias, WSPasswordCallback.SIGNATURE)};
-        LOG.fine("Creating SAML Token");
-        callbackHandler.handle(cb);
-        String password = cb[0].getPassword();
+        String password = null;
+        if (callbackHandler != null) {
+            WSPasswordCallback[] cb = {new WSPasswordCallback(alias, WSPasswordCallback.SIGNATURE)};
+            LOG.fine("Creating SAML Token");
+            callbackHandler.handle(cb);
+            password = cb[0].getPassword();
+        }
 
         LOG.fine("Signing SAML Token");
         boolean useKeyValue = signatureProperties.isUseKeyValue();


Mime
View raw message