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

[camel] branch main created (now 785cd13664b)

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

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


      at 785cd13664b CAMEL-18665: camel-core: JsseParameters should use the camel provided resource loader instead of its own

This branch includes the following new commits:

     new e17197e9d5d CAMEL-18665: camel-core: JsseParameters should use the camel provided resource loader instead of its own
     new eb0dadcb7ba Regen for commit 04dc07755d97b22d0e22252c84e9625b90c695f6
     new 785cd13664b CAMEL-18665: camel-core: JsseParameters should use the camel provided resource loader instead of its own

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[camel] 02/03: Regen for commit 04dc07755d97b22d0e22252c84e9625b90c695f6

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit eb0dadcb7ba702103fe3e88f4a975be863504607
Author: davsclaus <da...@users.noreply.github.com>
AuthorDate: Sat Nov 5 08:53:09 2022 +0000

    Regen for commit 04dc07755d97b22d0e22252c84e9625b90c695f6
    
    Signed-off-by: GitHub <no...@github.com>
---
 .../java/org/apache/camel/component/xmlsecurity/XmlSignatureTest.java    | 1 -
 1 file changed, 1 deletion(-)

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 d6f81575de5..f4ed76979f2 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
@@ -102,7 +102,6 @@ import org.apache.camel.spi.Registry;
 import org.apache.camel.support.SimpleRegistry;
 import org.apache.camel.support.processor.validation.SchemaValidationException;
 import org.apache.camel.test.junit5.CamelTestSupport;
-import org.apache.camel.test.junit5.TestSupport;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;


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

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 785cd13664bf995d250faa988066ad3a80934363
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Nov 5 09:57:32 2022 +0100

    CAMEL-18665: camel-core: JsseParameters should use the camel provided resource loader instead of its own
---
 .../user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_20.adoc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_20.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_20.adoc
index 0035db7de52..3f3e0351f5b 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_20.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_20.adoc
@@ -6,6 +6,12 @@ from both 3.0 to 3.1 and 3.1 to 3.2.
 
 == Upgrading Camel 3.19 to 3.20
 
+=== camel-api
+
+The `org.apache.camel.support.jsse.SSLContextParameters` is now using `ResourceLoader` from `CamelContext`
+to load keystore and other resources in a standard way. Therefore, the `SSLContextParameters` now must have been pre-configured
+with a `CamelContext` otherwise an exception is thrown.
+
 === camel-jsonpath
 
 There is a new option `unpackArray` that unpacks a single-element Json array, matched by a Jsonpath, into an object. This option is disabled by default (this behaviour was enabled by default in previous Camel versions). There is a new expression `jsonpathUnpack(String text, Class<?> resultType)` that makes use of this new option.


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

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e17197e9d5de64a86ce4a1432f40c4b9543f8345
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Nov 5 09:49:04 2022 +0100

    CAMEL-18665: camel-core: JsseParameters should use the camel provided resource loader instead of its own
---
 .../apache/camel/coap/CoAPComponentTLSTestBase.java    | 18 ++++++++++++++++--
 .../apache/camel/coap/CoAPRestComponentTLSTest.java    |  7 +++++++
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTLSTestBase.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTLSTestBase.java
index a4c229ae490..235b54fbd7c 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTLSTestBase.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTLSTestBase.java
@@ -24,6 +24,7 @@ import java.security.PublicKey;
 
 import javax.crypto.KeyGenerator;
 
+import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
@@ -225,7 +226,7 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
 
-        registerTLSConfiguration();
+        registerTLSConfiguration(context);
 
         return new RouteBuilder() {
             @Override
@@ -336,40 +337,48 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
         };
     }
 
-    private void registerTLSConfiguration() throws GeneralSecurityException, IOException {
+    private void registerTLSConfiguration(CamelContext context) throws GeneralSecurityException, IOException {
         KeyStoreParameters serviceKeystoreParameters = new KeyStoreParameters();
+        serviceKeystoreParameters.setCamelContext(context);
         serviceKeystoreParameters.setResource("service.jks");
         serviceKeystoreParameters.setPassword("security");
 
         KeyStoreParameters selfSignedKeyStoreParameters = new KeyStoreParameters();
+        selfSignedKeyStoreParameters.setCamelContext(context);
         selfSignedKeyStoreParameters.setResource("selfsigned.jks");
         selfSignedKeyStoreParameters.setPassword("security");
 
         KeyStoreParameters clientKeystoreParameters = new KeyStoreParameters();
+        clientKeystoreParameters.setCamelContext(context);
         clientKeystoreParameters.setResource("client.jks");
         clientKeystoreParameters.setPassword("security");
 
         KeyStoreParameters truststoreParameters = new KeyStoreParameters();
+        truststoreParameters.setCamelContext(context);
         truststoreParameters.setResource("truststore.jks");
         truststoreParameters.setPassword("storepass");
 
         KeyStoreParameters truststoreParameters2 = new KeyStoreParameters();
+        truststoreParameters2.setCamelContext(context);
         truststoreParameters2.setResource("truststore2.jks");
         truststoreParameters2.setPassword("storepass");
 
         SSLContextParameters serviceSSLContextParameters = new SSLContextParameters();
+        serviceSSLContextParameters.setCamelContext(context);
         KeyManagersParameters serviceSSLKeyManagers = new KeyManagersParameters();
         serviceSSLKeyManagers.setKeyPassword("security");
         serviceSSLKeyManagers.setKeyStore(serviceKeystoreParameters);
         serviceSSLContextParameters.setKeyManagers(serviceSSLKeyManagers);
 
         SSLContextParameters selfSignedServiceSSLContextParameters = new SSLContextParameters();
+        selfSignedServiceSSLContextParameters.setCamelContext(context);
         KeyManagersParameters selfSignedServiceSSLKeyManagers = new KeyManagersParameters();
         selfSignedServiceSSLKeyManagers.setKeyPassword("security");
         selfSignedServiceSSLKeyManagers.setKeyStore(selfSignedKeyStoreParameters);
         selfSignedServiceSSLContextParameters.setKeyManagers(selfSignedServiceSSLKeyManagers);
 
         SSLContextParameters clientAuthServiceSSLContextParameters = new SSLContextParameters();
+        clientAuthServiceSSLContextParameters.setCamelContext(context);
         KeyManagersParameters clientAuthServiceSSLKeyManagers = new KeyManagersParameters();
         clientAuthServiceSSLKeyManagers.setKeyPassword("security");
         clientAuthServiceSSLKeyManagers.setKeyStore(serviceKeystoreParameters);
@@ -382,16 +391,19 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
         clientAuthServiceSSLContextParameters.setServerParameters(clientAuthSSLContextServerParameters);
 
         SSLContextParameters clientSSLContextParameters = new SSLContextParameters();
+        clientSSLContextParameters.setCamelContext(context);
         TrustManagersParameters clientSSLTrustManagers = new TrustManagersParameters();
         clientSSLTrustManagers.setKeyStore(truststoreParameters);
         clientSSLContextParameters.setTrustManagers(clientSSLTrustManagers);
 
         SSLContextParameters clientSSLContextParameters2 = new SSLContextParameters();
+        clientSSLContextParameters2.setCamelContext(context);
         TrustManagersParameters clientSSLTrustManagers2 = new TrustManagersParameters();
         clientSSLTrustManagers2.setKeyStore(truststoreParameters2);
         clientSSLContextParameters2.setTrustManagers(clientSSLTrustManagers2);
 
         SSLContextParameters clientAuthClientSSLContextParameters = new SSLContextParameters();
+        clientAuthClientSSLContextParameters.setCamelContext(context);
         TrustManagersParameters clientAuthClientSSLTrustManagers = new TrustManagersParameters();
         clientAuthClientSSLTrustManagers.setKeyStore(truststoreParameters);
         clientAuthClientSSLContextParameters.setTrustManagers(clientAuthClientSSLTrustManagers);
@@ -401,6 +413,7 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
         clientAuthClientSSLContextParameters.setKeyManagers(clientAuthClientSSLKeyManagers);
 
         SSLContextParameters clientAuthClientSSLContextParameters2 = new SSLContextParameters();
+        clientAuthClientSSLContextParameters2.setCamelContext(context);
         TrustManagersParameters clientAuthClientSSLTrustManagers2 = new TrustManagersParameters();
         clientAuthClientSSLTrustManagers2.setKeyStore(truststoreParameters2);
         clientAuthClientSSLContextParameters2.setTrustManagers(clientAuthClientSSLTrustManagers2);
@@ -410,6 +423,7 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
         clientAuthClientSSLContextParameters2.setKeyManagers(clientAuthClientSSLKeyManagers2);
 
         SSLContextParameters selfSignedClientSSLContextParameters = new SSLContextParameters();
+        selfSignedClientSSLContextParameters.setCamelContext(context);
         TrustManagersParameters selfSignedClientSSLTrustManagers = new TrustManagersParameters();
         selfSignedClientSSLTrustManagers.setKeyStore(selfSignedKeyStoreParameters);
         selfSignedClientSSLContextParameters.setTrustManagers(selfSignedClientSSLTrustManagers);
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTLSTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTLSTest.java
index 4e726312590..457004e1ba9 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTLSTest.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTLSTest.java
@@ -48,6 +48,7 @@ public class CoAPRestComponentTLSTest extends CoAPRestComponentTestBase {
         builder.setClientOnly();
 
         KeyStoreParameters truststoreParameters = new KeyStoreParameters();
+        truststoreParameters.setCamelContext(context);
         truststoreParameters.setResource("truststore.jks");
         truststoreParameters.setPassword("storepass");
 
@@ -64,21 +65,27 @@ public class CoAPRestComponentTLSTest extends CoAPRestComponentTestBase {
     @Override
     protected void decorateRestConfiguration(RestConfigurationDefinition restConfig) {
         KeyStoreParameters keystoreParameters = new KeyStoreParameters();
+        keystoreParameters.setCamelContext(context);
         keystoreParameters.setResource("service.jks");
         keystoreParameters.setPassword("security");
 
         SSLContextParameters serviceSSLContextParameters = new SSLContextParameters();
+        serviceSSLContextParameters.setCamelContext(context);
         KeyManagersParameters serviceSSLKeyManagers = new KeyManagersParameters();
+        serviceSSLKeyManagers.setCamelContext(context);
         serviceSSLKeyManagers.setKeyPassword("security");
         serviceSSLKeyManagers.setKeyStore(keystoreParameters);
         serviceSSLContextParameters.setKeyManagers(serviceSSLKeyManagers);
 
         KeyStoreParameters truststoreParameters = new KeyStoreParameters();
+        truststoreParameters.setCamelContext(context);
         truststoreParameters.setResource("truststore.jks");
         truststoreParameters.setPassword("storepass");
 
         SSLContextParameters clientSSLContextParameters = new SSLContextParameters();
+        clientSSLContextParameters.setCamelContext(context);
         TrustManagersParameters clientSSLTrustManagers = new TrustManagersParameters();
+        clientSSLTrustManagers.setCamelContext(context);
         clientSSLTrustManagers.setKeyStore(truststoreParameters);
         clientSSLContextParameters.setTrustManagers(clientSSLTrustManagers);