camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r926499 [3/3] - in /camel/trunk: apache-camel/ apache-camel/src/main/descriptors/ camel-core/src/main/java/org/apache/camel/model/ camel-core/src/main/java/org/apache/camel/model/dataformat/ camel-core/src/main/resources/org/apache/camel/mo...
Date Tue, 23 Mar 2010 08:49:48 GMT
Added: camel/trunk/components/camel-crypto/src/test/resources/org/apache/camel/component/crypto/SpringSignatureTests.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-crypto/src/test/resources/org/apache/camel/component/crypto/SpringSignatureTests.xml?rev=926499&view=auto
==============================================================================
--- camel/trunk/components/camel-crypto/src/test/resources/org/apache/camel/component/crypto/SpringSignatureTests.xml
(added)
+++ camel/trunk/components/camel-crypto/src/test/resources/org/apache/camel/component/crypto/SpringSignatureTests.xml
Tue Mar 23 08:49:46 2010
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+    ">
+
+    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+        <!-- START SNIPPET: basic -->
+        <route>
+            <from uri="direct:keypair"/>
+            <to uri="sign://basic?privateKey=myPrivateKey" />
+            <to uri="verify://basic?publicKey=myPublicKey" />
+            <to uri="mock:result"/>
+        </route>
+        <!-- END SNIPPET: basic -->
+        
+        <!-- START SNIPPET: algorithm -->
+        <route>
+            <from uri="direct:algorithm"/>
+            <to uri="sign://rsa?algorithm=MD5withRSA&amp;privateKey=rsaPrivateKey"
/>
+            <to uri="verify://rsa?algorithm=MD5withRSA&amp;publicKey=rsaPublicKey"
/>
+            <to uri="mock:result"/>
+        </route>        
+        <!-- END SNIPPET: algorithm -->
+        
+        <!-- START SNIPPET: buffersize -->
+        <route>
+            <from uri="direct:buffersize" />
+            <to uri="sign://buffer?privateKey=myPrivateKey&amp;buffersize=1024" />
+            <to uri="verify://buffer?publicKey=myPublicKey&amp;buffersize=1024" />
+            <to uri="mock:result"/>
+        </route>        
+        <!-- END SNIPPET: buffersize -->
+        
+        <!-- START SNIPPET: random -->
+        <route>
+            <from uri="direct:random" />
+            <to uri="sign://random?privateKey=myPrivateKey&amp;secureRandom=someRandom"
/>
+            <to uri="verify://random?publicKey=myPublicKey" />
+            <to uri="mock:result"/>
+        </route>        
+        <!-- END SNIPPET: random -->
+        
+        <!-- START SNIPPET: provider -->
+        <route>
+            <from uri="direct:provider"/>
+            <to uri="sign://provider?privateKey=myPrivateKey&amp;provider=SUN" />
+            <to uri="verify://provider?publicKey=myPublicKey&amp;provider=SUN" />
+            <to uri="mock:result"/>
+        </route>        
+        <!-- END SNIPPET: provider -->
+        
+        <!-- START SNIPPET: certificate -->
+        <route>
+            <from uri="direct:certificate"/>
+            <to uri="sign://withcert?privateKey=myPrivateKey" />
+            <to uri="verify://withcert?certificate=myCert" />
+            <to uri="mock:result"/>
+        </route>        
+        <!-- END SNIPPET: certificate -->
+        
+        <!-- START SNIPPET: keystore -->
+        <route>
+            <from uri="direct:keystore"/>
+            <to uri="sign://keystore?keystore=keystore&amp;alias=bob&amp;password=letmein"
/>
+            <to uri="verify://keystore?keystore=keystore&amp;alias=bob" />
+            <to uri="mock:result"/>
+        </route>        
+        <!-- END SNIPPET: keystore -->
+        
+         <!-- START SNIPPET: signature-header -->
+        <route>
+            <from uri="direct:signature-header"/>
+            <to uri="sign://another?privateKey=myPrivateKey&amp;signatureHeader=AnotherDigitalSignature"
/>
+            <to uri="verify://another?publicKey=myPublicKey&amp;signatureHeader=AnotherDigitalSignature"
/>
+            <to uri="mock:result"/>
+        </route>        
+        <!-- END SNIPPET: signature-header -->
+        
+        <!-- START SNIPPET: alias -->
+        <route>
+            <from uri="direct:alias-sign"/>
+            <to uri="sign://alias?keystore=keystore" />
+        </route>       
+        <route>
+            <from uri="direct:alias-verify"/>
+            <to uri="verify://alias?keystore=keystore" />
+            <to uri="mock:result"/>
+        </route>    
+        <!-- END SNIPPET: alias -->
+        
+        <!-- START SNIPPET: headerkey -->
+        <route>
+            <from uri="direct:headerkey-sign"/>
+            <to uri="sign://headerkey" />
+        </route>       
+        <route>
+            <from uri="direct:headerkey-verify"/>
+            <to uri="verify://headerkey" />
+            <to uri="mock:result"/>
+        </route>    
+        <!-- END SNIPPET: headerkey -->
+    </camelContext>
+
+    <bean id="keystore" class="org.apache.camel.component.crypto.SpringSignatureTest"
factory-method="keystore"/>
+    <bean id="myPrivateKey" class="org.apache.camel.component.crypto.SpringSignatureTest"
factory-method="privateKeyFromKeystore"/>
+    <bean id="myCert" class="org.apache.camel.component.crypto.SpringSignatureTest" factory-method="certificateFromKeystore"/>
+    <bean id="myPublicKey" class="org.apache.camel.component.crypto.SpringSignatureTest"
factory-method="publicKey"/>
+    <bean id="rsaPrivateKey" class="org.apache.camel.component.crypto.SpringSignatureTest"
factory-method="privateRSAKey"/>
+    <bean id="rsaPublicKey" class="org.apache.camel.component.crypto.SpringSignatureTest"
factory-method="publicRSAKey"/>
+    <bean id="someRandom" class="org.apache.camel.component.crypto.SpringSignatureTest"
factory-method="random"/>
+
+</beans>

Propchange: camel/trunk/components/camel-crypto/src/test/resources/org/apache/camel/component/crypto/SpringSignatureTests.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-crypto/src/test/resources/org/apache/camel/component/crypto/SpringSignatureTests.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-crypto/src/test/resources/org/apache/camel/component/crypto/SpringSignatureTests.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: camel/trunk/components/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/pom.xml?rev=926499&r1=926498&r2=926499&view=diff
==============================================================================
--- camel/trunk/components/pom.xml (original)
+++ camel/trunk/components/pom.xml Tue Mar 23 08:49:46 2010
@@ -40,6 +40,7 @@
     <module>camel-cometd</module>
     <module>camel-cache</module>
     <module>camel-castor</module>
+    <module>camel-crypto</module>
     <module>camel-csv</module>
     <module>camel-cxf</module>
     <module>camel-dozer</module>

Modified: camel/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=926499&r1=926498&r2=926499&view=diff
==============================================================================
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Tue Mar 23 08:49:46 2010
@@ -38,7 +38,9 @@
     <activemq-version>5.3.0</activemq-version>
     <apacheds-version>1.5.4</apacheds-version>
     <axiom-version>1.2.8</axiom-version>
+    <bouncycastle-version>140</bouncycastle-version>
     <cometd-bayeux-version>6.1.11</cometd-bayeux-version>
+    <commons-codec>1.4</commons-codec>
     <commons-io-version>1.3.2</commons-io-version>
     <commons-logging-version>1.1.1</commons-logging-version>
     <commons-logging-api-version>1.1</commons-logging-api-version>
@@ -227,6 +229,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
+        <artifactId>camel-crypto</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
         <artifactId>camel-csv</artifactId>
         <version>${project.version}</version>
       </dependency>
@@ -953,7 +960,19 @@
         <artifactId>jetty-webapp</artifactId>
         <version>${jetty-version}</version>
       </dependency>
-
+      
+      <!-- optional crypto support -->
+      <dependency>
+        <groupId>commons-codec</groupId>
+        <artifactId>commons-codec</artifactId>
+        <version>${commons-codec}</version>      
+      </dependency> 
+      <dependency>
+        <groupId>bouncycastle</groupId>
+        <artifactId>bcprov-jdk15</artifactId>
+        <version>${bouncycastle-version}</version>
+      </dependency> 
+      
       <!-- optional restlet support -->
       <dependency>
         <groupId>org.restlet</groupId>



Mime
View raw message