You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/11/05 08:08:22 UTC

[camel] 02/03: CAMEL-18665: camel-core: JsseParameters should use the camel provided resource loader instead of its own

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit c6765846457e5c9dbca5456f8224dfa628a7cff8
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Nov 5 08:59:34 2022 +0100

    CAMEL-18665: camel-core: JsseParameters should use the camel provided resource loader instead of its own
---
 .../apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java   | 2 +-
 .../org/apache/camel/component/xmlsecurity/XmlSignatureTest.java     | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java
index a6a12ae3d26..5f7e3679494 100644
--- a/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java
+++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java
@@ -272,7 +272,7 @@ public class XMLSecurityDataFormat extends ServiceSupport implements DataFormat,
 
     @Override
     protected void doStart() throws Exception {
-        // noop
+        CamelContextAware.trySetCamelContext(keyOrTrustStoreParameters, getCamelContext());
     }
 
     @Override
diff --git a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XmlSignatureTest.java b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XmlSignatureTest.java
index 7a64e97cbc9..d6f81575de5 100644
--- a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XmlSignatureTest.java
+++ b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XmlSignatureTest.java
@@ -116,13 +116,10 @@ import static org.junit.jupiter.api.Assertions.fail;
 public class XmlSignatureTest extends CamelTestSupport {
 
     protected static String payload;
-    private static boolean includeNewLine = true;
+    private static boolean includeNewLine;
     private KeyPair keyPair;
 
     static {
-        if (!TestSupport.isJavaVendor("Azul")) {
-            includeNewLine = false;
-        }
         payload = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
                   + (includeNewLine ? "\n" : "")
                   + "<root xmlns=\"http://test/test\"><test>Test Message</test></root>";