Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A877810C0B for ; Tue, 22 Oct 2013 09:56:08 +0000 (UTC) Received: (qmail 98781 invoked by uid 500); 22 Oct 2013 09:56:07 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 98743 invoked by uid 500); 22 Oct 2013 09:56:06 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 98735 invoked by uid 99); 22 Oct 2013 09:56:05 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Oct 2013 09:56:05 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 787FE50407; Tue, 22 Oct 2013 09:56:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ningjiang@apache.org To: commits@camel.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: CAMEL-6881 The XmlSignatureProcessor should support other SecurityProvider Date: Tue, 22 Oct 2013 09:56:05 +0000 (UTC) Updated Branches: refs/heads/master ec1a4b9ab -> ed036bb3e CAMEL-6881 The XmlSignatureProcessor should support other SecurityProvider Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ed036bb3 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ed036bb3 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ed036bb3 Branch: refs/heads/master Commit: ed036bb3e5c581db75fc390fff66ed798da5330c Parents: ec1a4b9 Author: Willem Jiang Authored: Tue Oct 22 17:53:09 2013 +0800 Committer: Willem Jiang Committed: Tue Oct 22 17:55:21 2013 +0800 ---------------------------------------------------------------------- .../xmlsecurity/processor/XmlSignatureProcessor.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/ed036bb3/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureProcessor.java ---------------------------------------------------------------------- diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureProcessor.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureProcessor.java index 9a6fd5c..c0e03d1 100644 --- a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureProcessor.java +++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureProcessor.java @@ -34,8 +34,13 @@ public abstract class XmlSignatureProcessor implements Processor { private static final Logger LOG = LoggerFactory.getLogger(XmlSignatureProcessor.class); static { - SantuarioUtil.initializeSantuario(); - SantuarioUtil.addSantuarioJSR105Provider(); + try { + SantuarioUtil.initializeSantuario(); + SantuarioUtil.addSantuarioJSR105Provider(); + } catch (Throwable t) { + // provider not in classpath, ignore and fall back to jre default + LOG.info("Cannot add the SantuarioJSR105Provider due to {0}, fall back to JRE default.", t); + } } public abstract XmlSignatureConfiguration getConfiguration();