camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [4/6] camel git commit: Camel component docs - Fixed wrong endpoints.
Date Thu, 07 Jan 2016 11:59:23 GMT
Camel component docs - Fixed wrong endpoints.


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

Branch: refs/heads/camel-2.16.x
Commit: 9bbc568860634ffb04ed6a41f4fa3f6c83293194
Parents: 8fb98e9
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Jan 7 11:29:53 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Jan 7 12:44:48 2016 +0100

----------------------------------------------------------------------
 .../crypto/DigitalSignatureConfiguration.java   | 42 ++++++++++++---
 .../crypto/DigitalSignatureEndpoint.java        | 12 +++--
 .../component/crypto/ECDSASignatureTest.java    |  8 +--
 .../camel/component/crypto/SignatureTests.java  | 48 ++++++++---------
 .../component/crypto/SpringSignatureTests.xml   | 56 ++++++++++----------
 5 files changed, 97 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/9bbc5688/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureConfiguration.java
b/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureConfiguration.java
index 7ccb95c..bdd01b4 100644
--- a/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureConfiguration.java
+++ b/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureConfiguration.java
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.component.crypto;
 
-import java.io.IOException;
-import java.security.GeneralSecurityException;
 import java.security.KeyStore;
 import java.security.PrivateKey;
 import java.security.PublicKey;
@@ -41,9 +39,13 @@ public class DigitalSignatureConfiguration implements Cloneable, CamelContextAwa
 
     @UriPath @Metadata(required = "true")
     private CryptoOperation cryptoOperation;
+    @UriParam @Metadata(required = "true")
+    private String name;
     @UriParam
     private PrivateKey privateKey;
     @UriParam
+    private KeyStoreParameters keyStoreParameters;
+    @UriParam
     private KeyStore keystore;
     @UriParam
     private SecureRandom secureRandom;
@@ -57,7 +59,7 @@ public class DigitalSignatureConfiguration implements Cloneable, CamelContextAwa
     private String signatureHeaderName;
     @UriParam
     private String alias;
-    @UriParam
+    @UriParam(javaType = "java.lang.String")
     private char[] password;
     @UriParam
     private PublicKey publicKey;
@@ -101,6 +103,17 @@ public class DigitalSignatureConfiguration implements Cloneable, CamelContextAwa
         setSecureRandomName(secureRandomName);
     }
 
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * The logical name of this operation.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
     /**
      * Gets the JCE name of the Algorithm that should be used for the signer.
      */
@@ -323,11 +336,24 @@ public class DigitalSignatureConfiguration implements Cloneable, CamelContextAwa
     public void setPassword(char[] password) {
         this.password = password;
     }
-    
-    public void setKeyStoreParameters(KeyStoreParameters parameters) 
-        throws GeneralSecurityException, IOException {
-        if (parameters != null) {
-            this.keystore = parameters.createKeyStore();
+
+    public KeyStoreParameters getKeyStoreParameters() {
+        return keyStoreParameters;
+    }
+
+    /**
+     * Sets the KeyStore that can contain keys and Certficates for use in
+     * signing and verifying exchanges based on the given KeyStoreParameters.
+     * A {@link KeyStore} is typically used
+     * with an alias, either one supplied in the Route definition or dynamically
+     * via the message header "CamelSignatureKeyStoreAlias". If no alias is
+     * supplied and there is only a single entry in the Keystore, then this
+     * single entry will be used.
+     */
+    public void setKeyStoreParameters(KeyStoreParameters keyStoreParameters) throws Exception
{
+        this.keyStoreParameters = keyStoreParameters;
+        if (keyStoreParameters != null) {
+            this.keystore = keyStoreParameters.createKeyStore();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/9bbc5688/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureEndpoint.java
b/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureEndpoint.java
index a33dedc..40a5618 100644
--- a/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureEndpoint.java
+++ b/components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureEndpoint.java
@@ -31,7 +31,10 @@ import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
 
-@UriEndpoint(scheme = "crypto", title = "Crypto (Java Cryptographic Extension)", syntax =
"crypto:cryptoOperation", producerOnly = true, label = "security,transformation")
+/**
+ * The crypto component is used for signing and verifying exchanges using the Signature Service
of the Java Cryptographic Extension (JCE).
+ */
+@UriEndpoint(scheme = "crypto", title = "Crypto (JCE)", syntax = "crypto:cryptoOperation:name",
producerOnly = true, label = "security,transformation")
 public class DigitalSignatureEndpoint extends DefaultEndpoint {
     @UriParam
     private DigitalSignatureConfiguration configuration;
@@ -57,10 +60,9 @@ public class DigitalSignatureEndpoint extends DefaultEndpoint {
         return true;
     }
 
-    public Object getManagedObject(DigitalSignatureEndpoint endpoint) {
-        return this;
-    }
-
+    /**
+     * Sets the configuration to use
+     */
     public void setConfiguration(DigitalSignatureConfiguration configuration) {
         this.configuration = configuration;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/9bbc5688/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/ECDSASignatureTest.java
----------------------------------------------------------------------
diff --git a/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/ECDSASignatureTest.java
b/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/ECDSASignatureTest.java
index b24988c..7b20ee3 100644
--- a/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/ECDSASignatureTest.java
+++ b/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/ECDSASignatureTest.java
@@ -85,14 +85,14 @@ public class ECDSASignatureTest extends CamelTestSupport {
                 // START SNIPPET: ecdsa-sha1
 
                 // we can set the keys explicitly on the endpoint instances.
-                context.getEndpoint("crypto:sign://ecdsa-sha1?algorithm=SHA1withECDSA", DigitalSignatureEndpoint.class)
+                context.getEndpoint("crypto:sign:ecdsa-sha1?algorithm=SHA1withECDSA", DigitalSignatureEndpoint.class)
                         .setPrivateKey(privateKey);
-                context.getEndpoint("crypto:verify://ecdsa-sha1?algorithm=SHA1withECDSA",
DigitalSignatureEndpoint.class)
+                context.getEndpoint("crypto:verify:ecdsa-sha1?algorithm=SHA1withECDSA", DigitalSignatureEndpoint.class)
                         .setPublicKey(x509.getPublicKey());
 
                 from("direct:ecdsa-sha1")
-                    .to("crypto:sign://ecdsa-sha1?algorithm=SHA1withECDSA")
-                    .to("crypto:verify://ecdsa-sha1?algorithm=SHA1withECDSA")
+                    .to("crypto:sign:ecdsa-sha1?algorithm=SHA1withECDSA")
+                    .to("crypto:verify:ecdsa-sha1?algorithm=SHA1withECDSA")
                     .to("mock:result");
                 // END SNIPPET: ecdsa-sha1
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/9bbc5688/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/SignatureTests.java
----------------------------------------------------------------------
diff --git a/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/SignatureTests.java
b/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/SignatureTests.java
index 72cf658..1a98a4f 100644
--- a/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/SignatureTests.java
+++ b/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/SignatureTests.java
@@ -71,7 +71,7 @@ public class SignatureTests extends CamelTestSupport {
         return new RouteBuilder[] {new RouteBuilder() {
             public void configure() throws Exception {
                 // START SNIPPET: basic
-                from("direct:keypair").to("crypto:sign://basic?privateKey=#myPrivateKey",
"crypto:verify://basic?publicKey=#myPublicKey", "mock:result");
+                from("direct:keypair").to("crypto:sign:basic?privateKey=#myPrivateKey", "crypto:verify:basic?publicKey=#myPublicKey",
"mock:result");
                 // END SNIPPET: basic
             }
         }, new RouteBuilder() {
@@ -82,9 +82,9 @@ public class SignatureTests extends CamelTestSupport {
                 PublicKey publicKey = keyPair.getPublic();
 
                 // we can set the keys explicitly on the endpoint instances.
-                context.getEndpoint("crypto:sign://rsa?algorithm=MD5withRSA", DigitalSignatureEndpoint.class).setPrivateKey(privateKey);
-                context.getEndpoint("crypto:verify://rsa?algorithm=MD5withRSA", DigitalSignatureEndpoint.class).setPublicKey(publicKey);
-                from("direct:algorithm").to("crypto:sign://rsa?algorithm=MD5withRSA", "crypto:verify://rsa?algorithm=MD5withRSA",
"mock:result");
+                context.getEndpoint("crypto:sign:rsa?algorithm=MD5withRSA", DigitalSignatureEndpoint.class).setPrivateKey(privateKey);
+                context.getEndpoint("crypto:verify:rsa?algorithm=MD5withRSA", DigitalSignatureEndpoint.class).setPublicKey(publicKey);
+                from("direct:algorithm").to("crypto:sign:rsa?algorithm=MD5withRSA", "crypto:verify:rsa?algorithm=MD5withRSA",
"mock:result");
                 // END SNIPPET: algorithm
             }
         }, new RouteBuilder() {
@@ -95,9 +95,9 @@ public class SignatureTests extends CamelTestSupport {
                 PublicKey publicKey = keyPair.getPublic();
 
                 // we can set the keys explicitly on the endpoint instances.
-                context.getEndpoint("crypto:sign://rsa?algorithm=SHA1withRSA", DigitalSignatureEndpoint.class).setPrivateKey(privateKey);
-                context.getEndpoint("crypto:verify://rsa?algorithm=SHA1withRSA", DigitalSignatureEndpoint.class).setPublicKey(publicKey);
-                from("direct:rsa-sha1").to("crypto:sign://rsa?algorithm=SHA1withRSA", "crypto:verify://rsa?algorithm=SHA1withRSA",
"mock:result");
+                context.getEndpoint("crypto:sign:rsa?algorithm=SHA1withRSA", DigitalSignatureEndpoint.class).setPrivateKey(privateKey);
+                context.getEndpoint("crypto:verify:rsa?algorithm=SHA1withRSA", DigitalSignatureEndpoint.class).setPublicKey(publicKey);
+                from("direct:rsa-sha1").to("crypto:sign:rsa?algorithm=SHA1withRSA", "crypto:verify:rsa?algorithm=SHA1withRSA",
"mock:result");
                 // END SNIPPET: rsa-sha1
             }
         }, new RouteBuilder() {
@@ -108,74 +108,74 @@ public class SignatureTests extends CamelTestSupport {
                 PublicKey publicKey = keyPair.getPublic();
 
                 // we can set the keys explicitly on the endpoint instances.
-                context.getEndpoint("crypto:sign://rsa?algorithm=SHA256withRSA", DigitalSignatureEndpoint.class).setPrivateKey(privateKey);
-                context.getEndpoint("crypto:verify://rsa?algorithm=SHA256withRSA", DigitalSignatureEndpoint.class).setPublicKey(publicKey);
-                from("direct:rsa-sha256").to("crypto:sign://rsa?algorithm=SHA256withRSA",
"crypto:verify://rsa?algorithm=SHA256withRSA", "mock:result");
+                context.getEndpoint("crypto:sign:rsa?algorithm=SHA256withRSA", DigitalSignatureEndpoint.class).setPrivateKey(privateKey);
+                context.getEndpoint("crypto:verify:rsa?algorithm=SHA256withRSA", DigitalSignatureEndpoint.class).setPublicKey(publicKey);
+                from("direct:rsa-sha256").to("crypto:sign:rsa?algorithm=SHA256withRSA", "crypto:verify:rsa?algorithm=SHA256withRSA",
"mock:result");
                 // END SNIPPET: rsa-sha256
             }
         }, new RouteBuilder() {
             public void configure() throws Exception {
                 // START SNIPPET: buffersize
-                from("direct:buffersize").to("crypto:sign://buffer?privateKey=#myPrivateKey&buffersize=1024",
"crypto:verify://buffer?publicKey=#myPublicKey&buffersize=1024", "mock:result");
+                from("direct:buffersize").to("crypto:sign:buffer?privateKey=#myPrivateKey&buffersize=1024",
"crypto:verify:buffer?publicKey=#myPublicKey&buffersize=1024", "mock:result");
                 // END SNIPPET: buffersize
             }
         }, new RouteBuilder() {
             public void configure() throws Exception {
                 // START SNIPPET: provider
-                from("direct:provider").to("crypto:sign://provider?privateKey=#myPrivateKey&provider=SUN",
"crypto:verify://provider?publicKey=#myPublicKey&provider=SUN", "mock:result");
+                from("direct:provider").to("crypto:sign:provider?privateKey=#myPrivateKey&provider=SUN",
"crypto:verify:provider?publicKey=#myPublicKey&provider=SUN", "mock:result");
                 // END SNIPPET: provider
             }
         }, new RouteBuilder() {
             public void configure() throws Exception {
                 // START SNIPPET: certificate
-                from("direct:certificate").to("crypto:sign://withcert?privateKey=#myPrivateKey",
"crypto:verify://withcert?certificate=#myCert", "mock:result");
+                from("direct:certificate").to("crypto:sign:withcert?privateKey=#myPrivateKey",
"crypto:verify:withcert?certificate=#myCert", "mock:result");
                 // END SNIPPET: certificate
             }
         }, new RouteBuilder() {
             public void configure() throws Exception {
                 // START SNIPPET: keystore
-                from("direct:keystore").to("crypto:sign://keystore?keystore=#keystore&alias=bob&password=letmein",
"crypto:verify://keystore?keystore=#keystore&alias=bob", "mock:result");
+                from("direct:keystore").to("crypto:sign:keystore?keystore=#keystore&alias=bob&password=letmein",
"crypto:verify:keystore?keystore=#keystore&alias=bob", "mock:result");
                 // END SNIPPET: keystore
             }
         }, new RouteBuilder() {
             public void configure() throws Exception {
                 // START SNIPPET: keystore
-                from("direct:keystoreParameters").to("crypto:sign://keyStoreParameters?keyStoreParameters=#signatureParams&alias=bob&password=letmein",
-                    "crypto:verify://keyStoreParameters?keyStoreParameters=#signatureParams&alias=bob",
"mock:result");
+                from("direct:keystoreParameters").to("crypto:sign:keyStoreParameters?keyStoreParameters=#signatureParams&alias=bob&password=letmein",
+                    "crypto:verify:keyStoreParameters?keyStoreParameters=#signatureParams&alias=bob",
"mock:result");
                 // END SNIPPET: keystore
             }
         }, new RouteBuilder() {
             public void configure() throws Exception {
                 // START SNIPPET: signature-header
-                from("direct:signature-header").to("crypto:sign://another?privateKey=#myPrivateKey&signatureHeader=AnotherDigitalSignature",
-                                                   "crypto:verify://another?publicKey=#myPublicKey&signatureHeader=AnotherDigitalSignature",
"mock:result");
+                from("direct:signature-header").to("crypto:sign:another?privateKey=#myPrivateKey&signatureHeader=AnotherDigitalSignature",
+                                                   "crypto:verify:another?publicKey=#myPublicKey&signatureHeader=AnotherDigitalSignature",
"mock:result");
                 // END SNIPPET: signature-header
             }
         }, new RouteBuilder() {
             public void configure() throws Exception {
                 // START SNIPPET: random
-                from("direct:random").to("crypto:sign://another?privateKey=#myPrivateKey&secureRandom=#someRandom",
"crypto:verify://another?publicKey=#myPublicKey&secureRandom=#someRandom",
+                from("direct:random").to("crypto:sign:another?privateKey=#myPrivateKey&secureRandom=#someRandom",
"crypto:verify:another?publicKey=#myPublicKey&secureRandom=#someRandom",
                                          "mock:result");
                 // END SNIPPET: random
             }
         }, new RouteBuilder() {
             public void configure() throws Exception {
                 // START SNIPPET: alias
-                from("direct:alias-sign").to("crypto:sign://alias?keystore=#keystore");
-                from("direct:alias-verify").to("crypto:verify://alias?keystore=#keystore",
"mock:result");
+                from("direct:alias-sign").to("crypto:sign:alias?keystore=#keystore");
+                from("direct:alias-verify").to("crypto:verify:alias?keystore=#keystore",
"mock:result");
                 // END SNIPPET: alias
             }
         }, new RouteBuilder() {
             public void configure() throws Exception {
                 // START SNIPPET: headerkey
-                from("direct:headerkey-sign").to("crypto:sign://alias");
-                from("direct:headerkey-verify").to("crypto:verify://alias", "mock:result");
+                from("direct:headerkey-sign").to("crypto:sign:alias");
+                from("direct:headerkey-verify").to("crypto:verify:alias", "mock:result");
                 // END SNIPPET: headerkey
             }
         }, new RouteBuilder() {
             public void configure() throws Exception {
                 // START SNIPPET: clearheaders
-                from("direct:headers").to("crypto:sign://headers?privateKey=#myPrivateKey",
"crypto:verify://headers?publicKey=#myPublicKey&clearHeaders=false", "mock:result");
+                from("direct:headers").to("crypto:sign:headers?privateKey=#myPrivateKey",
"crypto:verify:headers?publicKey=#myPublicKey&clearHeaders=false", "mock:result");
                 // END SNIPPET: clearheaders
             }
         }};

http://git-wip-us.apache.org/repos/asf/camel/blob/9bbc5688/components/camel-crypto/src/test/resources/org/apache/camel/component/crypto/SpringSignatureTests.xml
----------------------------------------------------------------------
diff --git a/components/camel-crypto/src/test/resources/org/apache/camel/component/crypto/SpringSignatureTests.xml
b/components/camel-crypto/src/test/resources/org/apache/camel/component/crypto/SpringSignatureTests.xml
index 057aab1..7877714 100644
--- a/components/camel-crypto/src/test/resources/org/apache/camel/component/crypto/SpringSignatureTests.xml
+++ b/components/camel-crypto/src/test/resources/org/apache/camel/component/crypto/SpringSignatureTests.xml
@@ -26,8 +26,8 @@
         <!-- START SNIPPET: basic -->
         <route>
             <from uri="direct:keypair"/>
-            <to uri="crypto:sign://basic?privateKey=#myPrivateKey" />
-            <to uri="crypto:verify://basic?publicKey=#myPublicKey" />
+            <to uri="crypto:sign:basic?privateKey=#myPrivateKey" />
+            <to uri="crypto:verify:basic?publicKey=#myPublicKey" />
             <to uri="mock:result"/>
         </route>
         <!-- END SNIPPET: basic -->
@@ -35,8 +35,8 @@
         <!-- START SNIPPET: algorithm -->
         <route>
             <from uri="direct:algorithm"/>
-            <to uri="crypto:sign://rsa?algorithm=MD5withRSA&amp;privateKey=#rsaPrivateKey"
/>
-            <to uri="crypto:verify://rsa?algorithm=MD5withRSA&amp;publicKey=#rsaPublicKey"
/>
+            <to uri="crypto:sign:rsa?algorithm=MD5withRSA&amp;privateKey=#rsaPrivateKey"
/>
+            <to uri="crypto:verify:rsa?algorithm=MD5withRSA&amp;publicKey=#rsaPublicKey"
/>
             <to uri="mock:result"/>
         </route>        
         <!-- END SNIPPET: algorithm -->
@@ -44,8 +44,8 @@
         <!-- START SNIPPET: rsa-sha1 -->
         <route>
             <from uri="direct:rsa-sha1"/>
-            <to uri="crypto:sign://rsa?algorithm=SHA1withRSA&amp;privateKey=#rsaPrivateKey"
/>
-            <to uri="crypto:verify://rsa?algorithm=SHA1withRSA&amp;publicKey=#rsaPublicKey"
/>
+            <to uri="crypto:sign:rsa?algorithm=SHA1withRSA&amp;privateKey=#rsaPrivateKey"
/>
+            <to uri="crypto:verify:rsa?algorithm=SHA1withRSA&amp;publicKey=#rsaPublicKey"
/>
             <to uri="mock:result"/>
         </route>        
         <!-- END SNIPPET: rsa-sha1 -->
@@ -53,8 +53,8 @@
         <!-- START SNIPPET: rsa-sha256 -->
         <route>
             <from uri="direct:rsa-sha256"/>
-            <to uri="crypto:sign://rsa?algorithm=SHA256withRSA&amp;privateKey=#rsaPrivateKey"
/>
-            <to uri="crypto:verify://rsa?algorithm=SHA256withRSA&amp;publicKey=#rsaPublicKey"
/>
+            <to uri="crypto:sign:rsa?algorithm=SHA256withRSA&amp;privateKey=#rsaPrivateKey"
/>
+            <to uri="crypto:verify:rsa?algorithm=SHA256withRSA&amp;publicKey=#rsaPublicKey"
/>
             <to uri="mock:result"/>
         </route>        
         <!-- END SNIPPET: rsa-sha256 -->
@@ -62,8 +62,8 @@
         <!-- START SNIPPET: buffersize -->
         <route>
             <from uri="direct:buffersize" />
-            <to uri="crypto:sign://buffer?privateKey=#myPrivateKey&amp;buffersize=1024"
/>
-            <to uri="crypto:verify://buffer?publicKey=#myPublicKey&amp;buffersize=1024"
/>
+            <to uri="crypto:sign:buffer?privateKey=#myPrivateKey&amp;bufferSize=1024"
/>
+            <to uri="crypto:verify:buffer?publicKey=#myPublicKey&amp;bufferSize=1024"
/>
             <to uri="mock:result"/>
         </route>        
         <!-- END SNIPPET: buffersize -->
@@ -71,8 +71,8 @@
         <!-- START SNIPPET: random -->
         <route>
             <from uri="direct:random" />
-            <to uri="crypto:sign://random?privateKey=#myPrivateKey&amp;secureRandom=#someRandom"
/>
-            <to uri="crypto:verify://random?publicKey=#myPublicKey" />
+            <to uri="crypto:sign:random?privateKey=#myPrivateKey&amp;secureRandom=#someRandom"
/>
+            <to uri="crypto:verify:random?publicKey=#myPublicKey" />
             <to uri="mock:result"/>
         </route>        
         <!-- END SNIPPET: random -->
@@ -80,8 +80,8 @@
         <!-- START SNIPPET: provider -->
         <route>
             <from uri="direct:provider"/>
-            <to uri="crypto:sign://provider?privateKey=#myPrivateKey&amp;provider=SUN"
/>
-            <to uri="crypto:verify://provider?publicKey=#myPublicKey&amp;provider=SUN"
/>
+            <to uri="crypto:sign:provider?privateKey=#myPrivateKey&amp;provider=SUN"
/>
+            <to uri="crypto:verify:provider?publicKey=#myPublicKey&amp;provider=SUN"
/>
             <to uri="mock:result"/>
         </route>        
         <!-- END SNIPPET: provider -->
@@ -89,8 +89,8 @@
         <!-- START SNIPPET: certificate -->
         <route>
             <from uri="direct:certificate"/>
-            <to uri="crypto:sign://withcert?privateKey=#myPrivateKey" />
-            <to uri="crypto:verify://withcert?certificate=#myCert" />
+            <to uri="crypto:sign:withcert?privateKey=#myPrivateKey" />
+            <to uri="crypto:verify:withcert?certificate=#myCert" />
             <to uri="mock:result"/>
         </route>        
         <!-- END SNIPPET: certificate -->
@@ -98,8 +98,8 @@
         <!-- START SNIPPET: keystore -->
         <route>
             <from uri="direct:keystore"/>
-            <to uri="crypto:sign://keystore?keystore=#keystore&amp;alias=bob&amp;password=letmein"
/>
-            <to uri="crypto:verify://keystore?keystore=#keystore&amp;alias=bob" />
+            <to uri="crypto:sign:keystore?keystore=#keystore&amp;alias=bob&amp;password=letmein"
/>
+            <to uri="crypto:verify:keystore?keystore=#keystore&amp;alias=bob" />
             <to uri="mock:result"/>
         </route>        
         <!-- END SNIPPET: keystore -->
@@ -107,8 +107,8 @@
         <!-- START SNIPPET: keystoreParameters -->
         <route>
             <from uri="direct:keystoreParameters"/>
-            <to uri="crypto:sign://keystoreParameters?keyStoreParameters=#signatureParams&amp;alias=bob&amp;password=letmein"
/>
-            <to uri="crypto:verify://keystoreParameters?keyStoreParameters=#signatureParams&amp;alias=bob"
/>
+            <to uri="crypto:sign:keystoreParameters?keyStoreParameters=#signatureParams&amp;alias=bob&amp;password=letmein"
/>
+            <to uri="crypto:verify:keystoreParameters?keyStoreParameters=#signatureParams&amp;alias=bob"
/>
             <to uri="mock:result"/>
         </route>        
         <!-- END SNIPPET: keystoreParameters -->
@@ -116,8 +116,8 @@
          <!-- START SNIPPET: signature-header -->
         <route>
             <from uri="direct:signature-header"/>
-            <to uri="crypto:sign://another?privateKey=#myPrivateKey&amp;signatureHeader=AnotherDigitalSignature"
/>
-            <to uri="crypto:verify://another?publicKey=#myPublicKey&amp;signatureHeader=AnotherDigitalSignature"
/>
+            <to uri="crypto:sign:another?privateKey=#myPrivateKey&amp;signatureHeaderName=AnotherDigitalSignature"
/>
+            <to uri="crypto:verify:another?publicKey=#myPublicKey&amp;signatureHeaderName=AnotherDigitalSignature"
/>
             <to uri="mock:result"/>
         </route>        
         <!-- END SNIPPET: signature-header -->
@@ -125,11 +125,11 @@
         <!-- START SNIPPET: alias -->
         <route>
             <from uri="direct:alias-sign"/>
-            <to uri="crypto:sign://alias?keystore=#keystore" />
+            <to uri="crypto:sign:alias?keystore=#keystore" />
         </route>       
         <route>
             <from uri="direct:alias-verify"/>
-            <to uri="crypto:verify://alias?keystore=#keystore" />
+            <to uri="crypto:verify:alias?keystore=#keystore" />
             <to uri="mock:result"/>
         </route>    
         <!-- END SNIPPET: alias -->
@@ -137,19 +137,19 @@
         <!-- START SNIPPET: headerkey -->
         <route>
             <from uri="direct:headerkey-sign"/>
-            <to uri="crypto:sign://headerkey" />
+            <to uri="crypto:sign:headerkey" />
         </route>       
         <route>
             <from uri="direct:headerkey-verify"/>
-            <to uri="crypto:verify://headerkey" />
+            <to uri="crypto:verify:headerkey" />
             <to uri="mock:result"/>
         </route>    
         <!-- END SNIPPET: headerkey -->
         <!-- START SNIPPET: clearheaders -->
         <route>
             <from uri="direct:headers"/>
-            <to uri="crypto:sign://headers?privateKey=#myPrivateKey" />
-            <to uri="crypto:verify://headers?publicKey=#myPublicKey&amp;clearHeaders=false"
/>
+            <to uri="crypto:sign:headers?privateKey=#myPrivateKey" />
+            <to uri="crypto:verify:headers?publicKey=#myPublicKey&amp;clearHeaders=false"
/>
             <to uri="mock:result"/>
         </route>
         <!-- END SNIPPET: clearheaders -->


Mime
View raw message