Repository: camel
Updated Branches:
  refs/heads/camel-2.14.x 3b56eeab0 -> a6c54c535


NPE guard


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

Branch: refs/heads/camel-2.14.x
Commit: a6c54c5355f879ac949c03d8f486b63c90db63bb
Parents: 3b56eea
Author: Colm O hEigeartaigh <cohei...@apache.org>
Authored: Wed Nov 26 11:23:44 2014 +0000
Committer: Colm O hEigeartaigh <cohei...@apache.org>
Committed: Wed Nov 26 11:24:11 2014 +0000

----------------------------------------------------------------------
 .../component/xmlsecurity/processor/XmlSignerProcessor.java     | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a6c54c53/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignerProcessor.java
----------------------------------------------------------------------
diff --git 
a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignerProcessor.java
 
b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignerProcessor.java
index 4607aff..5e989e3 100644
--- 
a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignerProcessor.java
+++ 
b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignerProcessor.java
@@ -243,6 +243,11 @@ public class XmlSignerProcessor extends 
XmlSignatureProcessor {
 
             final Node node = getMessageBodyNode(out);
 
+            if (getConfiguration().getKeyAccessor() == null) {
+                throw new XmlSignatureNoKeyException(
+                    "Key selector is missing for XML signature generation. 
Specify a key selector in the configuration.");
+            }
+            
             final KeySelector keySelector = 
getConfiguration().getKeyAccessor().getKeySelector(out);
             if (keySelector == null) {
                 throw new XmlSignatureNoKeyException(

Reply via email to