cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/5] cxf git commit: Better reporting of failing algorithm suite name
Date Mon, 26 Sep 2016 11:47:43 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes a6c934ba2 -> 32176313e


Better reporting of failing algorithm suite name


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

Branch: refs/heads/3.0.x-fixes
Commit: c2a628f7cac6a4b64c19ce9659fceb4800e63ae1
Parents: a6c934b
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Sep 26 12:35:06 2016 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Sep 26 12:42:39 2016 +0100

----------------------------------------------------------------------
 .../cxf/ws/security/policy/custom/AlgorithmSuiteBuilder.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c2a628f7/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/custom/AlgorithmSuiteBuilder.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/custom/AlgorithmSuiteBuilder.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/custom/AlgorithmSuiteBuilder.java
index d5ce360..0c7038d 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/custom/AlgorithmSuiteBuilder.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/custom/AlgorithmSuiteBuilder.java
@@ -58,7 +58,13 @@ public class AlgorithmSuiteBuilder implements AssertionBuilder<Element>
{
         }
         AlgorithmSuite algorithmSuite = loader.getAlgorithmSuite(bus, spVersion, nestedPolicy);
         if (algorithmSuite == null || algorithmSuite.getAlgorithmSuiteType() == null) {
-            String algorithmSuiteName = DOMUtils.getFirstElement(nestedPolicyElement).getLocalName();
+            String algorithmSuiteName = null;
+            if (algorithmSuite != null) {
+                algorithmSuiteName = algorithmSuite.getFirstInvalidAlgorithmSuite();
+            }
+            if (algorithmSuiteName == null) {
+                algorithmSuiteName = DOMUtils.getFirstElement(nestedPolicyElement).getLocalName();
+            }
             throw new IllegalArgumentException(
                 "Algorithm suite \"" + algorithmSuiteName + "\" is not registered"
             );


Mime
View raw message