[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2019-01-09 Thread Andrea Cosentino (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16738028#comment-16738028
 ] 

Andrea Cosentino commented on CAMEL-12605:
--

I just merged the last PR from William and I don't have test failures

> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2019-01-09 Thread Claus Ibsen (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16738025#comment-16738025
 ] 

Claus Ibsen commented on CAMEL-12605:
-

On master I have some unit test failures in camel-as2. I wonder if others have 
the same?

> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-12-11 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16717695#comment-16717695
 ] 

ASF GitHub Bot commented on CAMEL-12605:


punkhorn opened a new pull request #2666: [CAMEL-12605] Refactoring and fixed 
issue of receipt for compressed m…
URL: https://github.com/apache/camel/pull/2666
 
 
   …essage


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-12-04 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16708760#comment-16708760
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd closed pull request #2650: [CAMEL-12605] Added further tests and fixes 
for compression
URL: https://github.com/apache/camel/pull/2650
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
index 915d210cc5f..5f7ce3bfc90 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
@@ -354,11 +354,11 @@ public HttpCoreContext send(String ediMessage,
 EntityUtils.setMessageEntity(request, 
pkcs7MimeEnvelopedDataEntity);
 break;
 }
-case SIGNED_ENCRYPTED_COMPRESSED: {
+case ENCRYPTED_COMPRESSED_SIGNED: {
 // Create Multipart Signed Entity containing EDI Entity
 AS2SignedDataGenerator signingGenrator = 
createSigningGenerator(httpContext);
 MultipartSignedEntity multipartSignedEntity = new 
MultipartSignedEntity(applicationEDIEntity, signingGenrator,
-AS2Charset.US_ASCII, AS2TransferEncoding.BASE64, true, 
null);
+AS2Charset.US_ASCII, AS2TransferEncoding.BASE64, false, 
null);
 
 // Create Compressed Entity containing Multipart Signed Entity
 CMSCompressedDataGenerator compressedDataGenerator = 
createCompressorGenerator(httpContext);
diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2MessageStructure.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2MessageStructure.java
index 760d9f06949..4fe5ff56b92 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2MessageStructure.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2MessageStructure.java
@@ -24,7 +24,7 @@
 PLAIN_COMPRESSED(false, false, true),
 SIGNED_COMPRESSED(true, false, true),
 ENCRYPTED_COMPRESSED(false, true, true),
-SIGNED_ENCRYPTED_COMPRESSED(true, true, true);
+ENCRYPTED_COMPRESSED_SIGNED(true, true, true);
 
 private final boolean isSigned;
 private final boolean isEncrypted;
diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
index 42a4b1bbbdc..f97b0ae8656 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
@@ -184,6 +184,8 @@ public static MimeEntity parseCompressedEntity(byte[] 
compressedData, InputExpan
 throws HttpException {
 
 byte[] uncompressedContent = uncompressData(compressedData, 
expanderProvider);
+
+String uncompressedContentString = new String(uncompressedContent);
 
 return parseEntity(uncompressedContent);
 }
@@ -198,7 +200,7 @@ public static MimeEntity parseEnvelopedEntity(byte[] 
envelopedContent, PrivateKe
 public static MimeEntity parseEntity(byte[] content) throws HttpException {
 
 try {
-
+String contentString = new String(content);
 InputStream is = new ByteArrayInputStream(content);
 AS2SessionInputBuffer inbuffer = new AS2SessionInputBuffer(new 
HttpTransportMetricsImpl(), DEFAULT_BUFFER_SIZE);
 inbuffer.bind(is);
diff --git 
a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java
 
b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java
index 5b9dc3e7523..b764d620bc4 100644
--- 
a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java
+++ 
b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java
@@ -929,6 +929,86 @@ public void envelopedAndCompressedMessageTest() throws 
Exception {
 ediEntity.getEdiMessage().replaceAll("[\n\r]", ""));
 }
 
+@Test
+public void 

[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-12-04 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16708759#comment-16708759
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd commented on issue #2650: [CAMEL-12605] Added further tests and fixes 
for compression
URL: https://github.com/apache/camel/pull/2650#issuecomment-444116875
 
 
   Thanks @punkhorn sorry for the delay


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-12-03 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16707636#comment-16707636
 ] 

ASF GitHub Bot commented on CAMEL-12605:


punkhorn opened a new pull request #2650: [CAMEL-12605] Added further tests and 
fixes for compression
URL: https://github.com/apache/camel/pull/2650
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-12-01 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16705981#comment-16705981
 ] 

ASF GitHub Bot commented on CAMEL-12605:


zregvart closed pull request #2648:  [CAMEL-12605] Added tests and fixes for 
compression
URL: https://github.com/apache/camel/pull/2648
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
index 8e1905cabd9..915d210cc5f 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
@@ -315,7 +315,7 @@ public HttpCoreContext send(String ediMessage,
 CMSCompressedDataGenerator compressedDataGenerator = 
createCompressorGenerator(httpContext);
 OutputCompressor compressor = createCompressor(httpContext);
 ApplicationPkcs7MimeCompressedDataEntity 
pkcs7MimeCompressedDataEntity = new ApplicationPkcs7MimeCompressedDataEntity(
-applicationEDIEntity, compressedDataGenerator, compressor, 
AS2TransferEncoding.BASE64, false);
+applicationEDIEntity, compressedDataGenerator, compressor, 
AS2TransferEncoding.BASE64, true);
 
 // Add Compressed Entity to main body of request.
 EntityUtils.setMessageEntity(request, 
pkcs7MimeCompressedDataEntity);
@@ -331,7 +331,7 @@ public HttpCoreContext send(String ediMessage,
 CMSCompressedDataGenerator compressedDataGenerator = 
createCompressorGenerator(httpContext);
 OutputCompressor compressor = createCompressor(httpContext);
 ApplicationPkcs7MimeCompressedDataEntity 
pkcs7MimeCompressedDataEntity = new ApplicationPkcs7MimeCompressedDataEntity(
-multipartSignedEntity, compressedDataGenerator, 
compressor, AS2TransferEncoding.BASE64, false);
+multipartSignedEntity, compressedDataGenerator, 
compressor, AS2TransferEncoding.BASE64, true);
 
 // Add Compressed Entity to main body of request.
 EntityUtils.setMessageEntity(request, 
pkcs7MimeCompressedDataEntity);
diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2MediaType.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2MediaType.java
index d6c4934a657..1aa3816dc01 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2MediaType.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2MediaType.java
@@ -27,9 +27,13 @@
  */
 public static final String APPLICATION_PKCS7_SIGNATURE = 
"application/pkcs7-signature; name=smime.p7s; smime-type=signed-data";
 /**
- * Media Type for Application PKCS7 Signature
+ * Media Type for Application PKCS7 Enveloped Data
+ */
+public static final String APPLICATION_PKCS7_MIME_ENVELOPED = 
"application/pkcs7-mime; smime-type=enveloped-data; name=smime.p7m";
+/**
+ * Media Type for Application PKCS7 Compressed Data
  */
-public static final String APPLICATION_PKCS7_MIME = 
"application/pkcs7-mime; name=smime.p7m; smime-type=enveloped-data; 
name=smime.p7m";
+public static final String APPLICATION_PKCS7_MIME_COMPRESSED = 
"application/pkcs7-mime; smime-type=compressed-data; name=smime.p7z";
 /**
  * Media Type for Text/Plain Data
  */
diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7MimeCompressedDataEntity.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7MimeCompressedDataEntity.java
index 7a88761f3a3..16402e48294 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7MimeCompressedDataEntity.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7MimeCompressedDataEntity.java
@@ -64,7 +64,7 @@ public ApplicationPkcs7MimeCompressedDataEntity(MimeEntity 
entity2Encrypt,
 public ApplicationPkcs7MimeCompressedDataEntity(byte[] compressedData, 
String compressedContentTransferEncoding, boolean isMainBody) {
 this.compressedData = Args.notNull(compressedData, "encryptedData");
 
-

[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-11-30 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16705196#comment-16705196
 ] 

ASF GitHub Bot commented on CAMEL-12605:


punkhorn opened a new pull request #2648:  [CAMEL-12605] Added tests and fixes 
for compression
URL: https://github.com/apache/camel/pull/2648
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-11-30 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16704535#comment-16704535
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd commented on issue #2645: [CAMEL-12605] Refactoring for compression 
support.
URL: https://github.com/apache/camel/pull/2645#issuecomment-443160124
 
 
   Thanks @punkhorn 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-11-30 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16704536#comment-16704536
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd closed pull request #2645: [CAMEL-12605] Refactoring for compression 
support.
URL: https://github.com/apache/camel/pull/2645
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
index ecd1f7a9cd5..8e1905cabd9 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
@@ -21,9 +21,11 @@
 import java.security.cert.Certificate;
 
 import org.apache.camel.component.as2.api.entity.ApplicationEDIEntity;
-import org.apache.camel.component.as2.api.entity.ApplicationPkcs7MimeEntity;
+import 
org.apache.camel.component.as2.api.entity.ApplicationPkcs7MimeCompressedDataEntity;
+import 
org.apache.camel.component.as2.api.entity.ApplicationPkcs7MimeEnvelopedDataEntity;
 import org.apache.camel.component.as2.api.entity.EntityParser;
 import org.apache.camel.component.as2.api.entity.MultipartSignedEntity;
+import org.apache.camel.component.as2.api.util.CompressionUtils;
 import org.apache.camel.component.as2.api.util.EncryptingUtils;
 import org.apache.camel.component.as2.api.util.EntityUtils;
 import org.apache.camel.component.as2.api.util.SigningUtils;
@@ -33,7 +35,9 @@
 import org.apache.http.message.BasicHttpEntityEnclosingRequest;
 import org.apache.http.protocol.HttpCoreContext;
 import org.apache.http.util.Args;
+import org.bouncycastle.cms.CMSCompressedDataGenerator;
 import org.bouncycastle.cms.CMSEnvelopedDataGenerator;
+import org.bouncycastle.operator.OutputCompressor;
 import org.bouncycastle.operator.OutputEncryptor;
 
 /**
@@ -156,6 +160,12 @@
  */
 public static final String ENCRYPTING_PRIVATE_KEY = 
CAMEL_AS2_CLIENT_PREFIX + "encrypting-private-key";
 
+/**
+ * The HTTP Context Attribute containing the algorithm used to compress EDI
+ * message
+ */
+public static final String COMPRESSION_ALGORITHM = CAMEL_AS2_CLIENT_PREFIX 
+ "compression-algorithm-name";
+
 /**
  * The HTTP Context Attribute containing the internet e-mail address of
  * sending system requesting a message disposition notification.
@@ -213,6 +223,7 @@ public HttpCoreContext send(String ediMessage,
 AS2SignatureAlgorithm signingAlgorithm,
 Certificate[] signingCertificateChain,
 PrivateKey signingPrivateKey,
+AS2CompressionAlgorithm compressionAlgorithm,
 String dispositionNotificationTo,
 String[] signedReceiptMicAlgorithms,
 AS2EncryptionAlgorithm encryptingAlgorithm,
@@ -238,6 +249,7 @@ public HttpCoreContext send(String ediMessage,
 httpContext.setAttribute(AS2ClientManager.SIGNING_ALGORITHM, 
signingAlgorithm);
 httpContext.setAttribute(AS2ClientManager.SIGNING_CERTIFICATE_CHAIN, 
signingCertificateChain);
 httpContext.setAttribute(AS2ClientManager.SIGNING_PRIVATE_KEY, 
signingPrivateKey);
+httpContext.setAttribute(AS2ClientManager.COMPRESSION_ALGORITHM, 
compressionAlgorithm);
 httpContext.setAttribute(AS2ClientManager.DISPOSITION_NOTIFICATION_TO, 
dispositionNotificationTo);
 
httpContext.setAttribute(AS2ClientManager.SIGNED_RECEIPT_MIC_ALGORITHMS, 
signedReceiptMicAlgorithms);
 httpContext.setAttribute(AS2ClientManager.ENCRYPTING_ALGORITHM, 
encryptingAlgorithm);
@@ -256,35 +268,112 @@ public HttpCoreContext send(String ediMessage,
 }
 switch (as2MessageStructure) {
 case PLAIN: {
+// Add EDI Entity to main body of request.
 applicationEDIEntity.setMainBody(true);
 EntityUtils.setMessageEntity(request, applicationEDIEntity);
 break;
 }
 case SIGNED: {
-AS2SignedDataGenerator gen = createSigningGenerator(httpContext);
-// Create Multipart Signed Entity
-MultipartSignedEntity multipartSignedEntity = new 
MultipartSignedEntity(applicationEDIEntity, gen,
+// Create Multipart Signed Entity containing EDI Entity
+AS2SignedDataGenerator signingGenrator = 
createSigningGenerator(httpContext);
+

[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-11-30 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16704537#comment-16704537
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd commented on issue #2645: [CAMEL-12605] Refactoring for compression 
support.
URL: https://github.com/apache/camel/pull/2645#issuecomment-443160179
 
 
   Merged on master


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-11-27 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16700672#comment-16700672
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd closed pull request #2639: [CAMEL-12605] Added support for compression
URL: https://github.com/apache/camel/pull/2639
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7MimeCompressedDataEntity.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7MimeCompressedDataEntity.java
new file mode 100644
index 000..7a88761f3a3
--- /dev/null
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7MimeCompressedDataEntity.java
@@ -0,0 +1,120 @@
+/**
+ * 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.
+ */
+package org.apache.camel.component.as2.api.entity;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.camel.component.as2.api.AS2Charset;
+import org.apache.camel.component.as2.api.AS2Header;
+import org.apache.camel.component.as2.api.CanonicalOutputStream;
+import org.apache.camel.component.as2.api.util.EntityUtils;
+import org.apache.http.Header;
+import org.apache.http.HeaderIterator;
+import org.apache.http.HttpException;
+import org.apache.http.entity.ContentType;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.Args;
+import org.bouncycastle.cms.CMSCompressedData;
+import org.bouncycastle.cms.CMSCompressedDataGenerator;
+import org.bouncycastle.cms.CMSProcessableByteArray;
+import org.bouncycastle.cms.CMSTypedData;
+import org.bouncycastle.operator.InputExpanderProvider;
+import org.bouncycastle.operator.OutputCompressor;
+
+public class ApplicationPkcs7MimeCompressedDataEntity extends MimeEntity {
+
+private static final String CONTENT_DISPOSITION = "attachment; 
filename=\"smime.p7z\"";
+
+private byte[] compressedData;
+
+public ApplicationPkcs7MimeCompressedDataEntity(MimeEntity entity2Encrypt,
+CMSCompressedDataGenerator 
dataGenerator,
+OutputCompressor 
compressor,
+String 
compressedContentTransferEncoding,
+boolean isMainBody)
+throws HttpException {
+setContentType(ContentType.create("application/pkcs7-mime", new 
BasicNameValuePair("smime-type", "compressed-data"),
+new BasicNameValuePair("name", "smime.p7z")));
+setContentTransferEncoding(compressedContentTransferEncoding);
+addHeader(AS2Header.CONTENT_DISPOSITION, CONTENT_DISPOSITION);
+setMainBody(isMainBody);
+try {
+this.compressedData = createCompressedData(entity2Encrypt, 
dataGenerator, compressor);
+} catch (Exception e) {
+throw new HttpException("Failed to create encrypted data");
+}
+}
+
+public ApplicationPkcs7MimeCompressedDataEntity(byte[] compressedData, 
String compressedContentTransferEncoding, boolean isMainBody) {
+this.compressedData = Args.notNull(compressedData, "encryptedData");
+
+setContentType(ContentType.create("application/pkcs7-mime", new 
BasicNameValuePair("smime-type", "compressed-datat"),
+new BasicNameValuePair("name", "smime.p7z")));
+setContentTransferEncoding(compressedContentTransferEncoding);
+addHeader(AS2Header.CONTENT_DISPOSITION, CONTENT_DISPOSITION);
+setMainBody(isMainBody);
+}
+
+@Override
+public void writeTo(OutputStream outstream) throws IOException {
+NoCloseOutputStream ncos = new 

[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-11-27 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16700671#comment-16700671
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd commented on issue #2639: [CAMEL-12605] Added support for compression
URL: https://github.com/apache/camel/pull/2639#issuecomment-442123446
 
 
   Thanks @punkhorn 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-11-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16699582#comment-16699582
 ] 

ASF GitHub Bot commented on CAMEL-12605:


punkhorn opened a new pull request #2639: [CAMEL-12605] Added support for 
compression
URL: https://github.com/apache/camel/pull/2639
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-10-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16653149#comment-16653149
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd commented on issue #2568: [CAMEL-12605] Updated signature algorithms 
supported and refactored API.
URL: https://github.com/apache/camel/pull/2568#issuecomment-430527901
 
 
   Thanks merged on master


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-10-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16653150#comment-16653150
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd closed pull request #2568: [CAMEL-12605] Updated signature algorithms 
supported and refactored API.
URL: https://github.com/apache/camel/pull/2568
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
index 5865efa9434..ecd1f7a9cd5 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
@@ -29,10 +29,8 @@
 import org.apache.camel.component.as2.api.util.SigningUtils;
 import org.apache.http.HttpException;
 import org.apache.http.HttpResponse;
-import org.apache.http.NameValuePair;
 import org.apache.http.entity.ContentType;
 import org.apache.http.message.BasicHttpEntityEnclosingRequest;
-import org.apache.http.message.BasicNameValuePair;
 import org.apache.http.protocol.HttpCoreContext;
 import org.apache.http.util.Args;
 import org.bouncycastle.cms.CMSEnvelopedDataGenerator;
@@ -123,10 +121,10 @@
 public static final String AS2_TO = CAMEL_AS2_CLIENT_PREFIX + "as2-to";
 
 /**
- * The HTTP Context Attribute containing the algorithm name used to sign 
EDI
+ * The HTTP Context Attribute containing the algorithm used to sign EDI
  * message
  */
-public static final String SIGNING_ALGORITHM_NAME = 
CAMEL_AS2_CLIENT_PREFIX + "signing-algorithm-name";
+public static final String SIGNING_ALGORITHM = CAMEL_AS2_CLIENT_PREFIX + 
"signing-algorithm";
 
 /**
  * The HTTP Context Attribute containing the certificate chain used to sign
@@ -192,6 +190,7 @@ public AS2ClientManager(AS2ClientConnection 
as2ClientConnection) {
  * @param as2MessageStructure - the structure of AS2 to send; see {@link 
AS2MessageStructure}
  * @param ediMessageContentType - the content typw of EDI message
  * @param ediMessageTransferEncoding - the transfer encoding used to 
transport EDI message
+ * @param signingAlgorithm - the algorithm used to sign the message or 
null if sending EDI message unsigned
  * @param signingCertificateChain - the chain of certificates used to sign 
the message or null if sending EDI message unsigned
  * @param signingPrivateKey - the private key used to sign EDI message
  * @param dispositionNotificationTo - an RFC2822 address to request a 
receipt or null if no receipt requested
@@ -211,6 +210,7 @@ public HttpCoreContext send(String ediMessage,
 AS2MessageStructure as2MessageStructure,
 ContentType ediMessageContentType,
 String ediMessageTransferEncoding,
+AS2SignatureAlgorithm signingAlgorithm,
 Certificate[] signingCertificateChain,
 PrivateKey signingPrivateKey,
 String dispositionNotificationTo,
@@ -235,6 +235,7 @@ public HttpCoreContext send(String ediMessage,
 httpContext.setAttribute(AS2ClientManager.AS2_MESSAGE_STRUCTURE, 
as2MessageStructure);
 httpContext.setAttribute(AS2ClientManager.EDI_MESSAGE_CONTENT_TYPE, 
ediMessageContentType);
 
httpContext.setAttribute(AS2ClientManager.EDI_MESSAGE_TRANSFER_ENCODING, 
ediMessageTransferEncoding);
+httpContext.setAttribute(AS2ClientManager.SIGNING_ALGORITHM, 
signingAlgorithm);
 httpContext.setAttribute(AS2ClientManager.SIGNING_CERTIFICATE_CHAIN, 
signingCertificateChain);
 httpContext.setAttribute(AS2ClientManager.SIGNING_PRIVATE_KEY, 
signingPrivateKey);
 httpContext.setAttribute(AS2ClientManager.DISPOSITION_NOTIFICATION_TO, 
dispositionNotificationTo);
@@ -303,6 +304,11 @@ public HttpCoreContext send(String ediMessage,
 }
 
 public AS2SignedDataGenerator createSigningGenerator(HttpCoreContext 
httpContext) throws HttpException {
+
+AS2SignatureAlgorithm signatureAlgorithm = 
httpContext.getAttribute(SIGNING_ALGORITHM, AS2SignatureAlgorithm.class);
+if (signatureAlgorithm == null) {
+throw new HttpException("Signing algorithm missing");
+}
 
 Certificate[] certificateChain = 
httpContext.getAttribute(SIGNING_CERTIFICATE_CHAIN, Certificate[].class);
 if (certificateChain == null) {

[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-10-16 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16652232#comment-16652232
 ] 

ASF GitHub Bot commented on CAMEL-12605:


GitHub user punkhorn opened a pull request:

https://github.com/apache/camel/pull/2568

[CAMEL-12605] Updated signature algorithms supported and refactored API.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/punkhorn/camel-upstream master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/2568.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2568


commit 35e3c22d33f18052c47a8023ac1e7c5b9d56ee22
Author: William Collins 
Date:   2018-10-16T18:45:07Z

[CAMEL-12605] Updated signature algorithms supported and refactored API.




> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-10-16 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16652231#comment-16652231
 ] 

ASF GitHub Bot commented on CAMEL-12605:


punkhorn opened a new pull request #2568: [CAMEL-12605] Updated signature 
algorithms supported and refactored API.
URL: https://github.com/apache/camel/pull/2568
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-09-27 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16629828#comment-16629828
 ] 

ASF GitHub Bot commented on CAMEL-12605:


Github user oscerd closed the pull request at:

https://github.com/apache/camel/pull/2536


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-09-27 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16629827#comment-16629827
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd closed pull request #2536: [CAMEL-12605] Added support for encrypted and 
signed AS2 message
URL: https://github.com/apache/camel/pull/2536
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
index c99f3413c74..5865efa9434 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
@@ -29,8 +29,10 @@
 import org.apache.camel.component.as2.api.util.SigningUtils;
 import org.apache.http.HttpException;
 import org.apache.http.HttpResponse;
+import org.apache.http.NameValuePair;
 import org.apache.http.entity.ContentType;
 import org.apache.http.message.BasicHttpEntityEnclosingRequest;
+import org.apache.http.message.BasicNameValuePair;
 import org.apache.http.protocol.HttpCoreContext;
 import org.apache.http.util.Args;
 import org.bouncycastle.cms.CMSEnvelopedDataGenerator;
@@ -252,31 +254,38 @@ public HttpCoreContext send(String ediMessage,
 throw new HttpException("Failed to create EDI message entity", e);
 }
 switch (as2MessageStructure) {
-case PLAIN:
+case PLAIN: {
 applicationEDIEntity.setMainBody(true);
 EntityUtils.setMessageEntity(request, applicationEDIEntity);
 break;
-case SIGNED:
+}
+case SIGNED: {
 AS2SignedDataGenerator gen = createSigningGenerator(httpContext);
 // Create Multipart Signed Entity
-try {
-MultipartSignedEntity multipartSignedEntity = new 
MultipartSignedEntity(applicationEDIEntity, gen,
-AS2Charset.US_ASCII, AS2TransferEncoding.BASE64, true, 
null);
-multipartSignedEntity.setMainBody(true);
-EntityUtils.setMessageEntity(request, multipartSignedEntity);
-} catch (Exception e) {
-throw new HttpException("Failed to sign message", e);
-}
+MultipartSignedEntity multipartSignedEntity = new 
MultipartSignedEntity(applicationEDIEntity, gen,
+AS2Charset.US_ASCII, AS2TransferEncoding.BASE64, true, 
null);
+multipartSignedEntity.setMainBody(true);
+EntityUtils.setMessageEntity(request, multipartSignedEntity);
 break;
-case ENCRYPTED:
+}
+case ENCRYPTED: {
 CMSEnvelopedDataGenerator envelopedDataGenerator = 
createEncryptingGenerator(httpContext);
 OutputEncryptor encryptor = createEncryptor(httpContext);
 ApplicationPkcs7MimeEntity pkcs7MimeEntity = new 
ApplicationPkcs7MimeEntity(applicationEDIEntity, envelopedDataGenerator, 
encryptor, AS2TransferEncoding.BASE64, true);
 EntityUtils.setMessageEntity(request, pkcs7MimeEntity);
 break;
-case ENCRYPTED_SIGNED:
-// TODO : Add code here to add application/pkcs7-mime entity when 
encryption facility available.
+}
+case ENCRYPTED_SIGNED: {
+AS2SignedDataGenerator signingGenrator = 
createSigningGenerator(httpContext);
+MultipartSignedEntity multipartSignedEntity = new 
MultipartSignedEntity(applicationEDIEntity,
+signingGenrator, AS2Charset.US_ASCII, 
AS2TransferEncoding.BASE64, false, null);
+ 
+CMSEnvelopedDataGenerator envelopedDataGenerator = 
createEncryptingGenerator(httpContext);
+OutputEncryptor encryptor = createEncryptor(httpContext);
+ApplicationPkcs7MimeEntity pkcs7MimeEntity = new 
ApplicationPkcs7MimeEntity(multipartSignedEntity, envelopedDataGenerator, 
encryptor, AS2TransferEncoding.BASE64, true);
+EntityUtils.setMessageEntity(request, pkcs7MimeEntity);
 break;
+}
 default:
 throw new HttpException("Unknown AS2 Message Structure");
 }
@@ -292,7 +301,7 @@ public HttpCoreContext send(String ediMessage,
 httpContext.setAttribute(HTTP_RESPONSE, response);
 return httpContext;
 }
-
+
 public AS2SignedDataGenerator createSigningGenerator(HttpCoreContext 
httpContext) throws HttpException {
 
 Certificate[] certificateChain = 

[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-09-27 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16629826#comment-16629826
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd commented on issue #2536: [CAMEL-12605] Added support for encrypted and 
signed AS2 message
URL: https://github.com/apache/camel/pull/2536#issuecomment-424977673
 
 
   Thanks @punkhorn merged on master


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-09-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16629236#comment-16629236
 ] 

ASF GitHub Bot commented on CAMEL-12605:


punkhorn opened a new pull request #2536: [CAMEL-12605] Added support for 
encrypted and signed AS2 message
URL: https://github.com/apache/camel/pull/2536
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-09-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16629237#comment-16629237
 ] 

ASF GitHub Bot commented on CAMEL-12605:


GitHub user punkhorn opened a pull request:

https://github.com/apache/camel/pull/2536

[CAMEL-12605] Added support for encrypted and signed AS2 message



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/punkhorn/camel-upstream master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/2536.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2536


commit 8277da3f5f54e2025c52cef78f915d121c3892f2
Author: William Collins 
Date:   2018-09-26T18:27:25Z

[CAMEL-12605] Added support for encrypted and signed AS2 message




> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-09-21 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16623109#comment-16623109
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd closed pull request #2526: [CAMEL-12605] Updated client integration tests
URL: https://github.com/apache/camel/pull/2526
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
index c8eb044acb1..c99f3413c74 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
@@ -194,9 +194,9 @@ public AS2ClientManager(AS2ClientConnection 
as2ClientConnection) {
  * @param signingPrivateKey - the private key used to sign EDI message
  * @param dispositionNotificationTo - an RFC2822 address to request a 
receipt or null if no receipt requested
  * @param signedReceiptMicAlgorithms - the senders list of signing 
algorithms for signing receipt, in preferred order,  or null if 
requesting an unsigned receipt.
- * @param encryptionAlgorithm - the algorithm used to encrypt the message 
or null if sending EDI message unencrypted
- * @param encryptionCertificateChain - the chain of certificates used to 
encrypt the message or null if sending EDI message unencrypted
- * @param encryptionPrivateKey - the private key used to encrypt EDI 
message
+ * @param encryptingAlgorithm - the algorithm used to encrypt the message 
or null if sending EDI message unencrypted
+ * @param encryptingCertificateChain - the chain of certificates used to 
encrypt the message or null if sending EDI message unencrypted
+ * @param encryptingPrivateKey - the private key used to encrypt EDI 
message
  * @return {@link HttpCoreContext} containing request and response used to 
send EDI message
  * @throws HttpException when things go wrong.
  */
@@ -213,9 +213,9 @@ public HttpCoreContext send(String ediMessage,
 PrivateKey signingPrivateKey,
 String dispositionNotificationTo,
 String[] signedReceiptMicAlgorithms,
-AS2EncryptionAlgorithm encryptionAlgorithm,
-Certificate[] encryptionCertificateChain,
-PrivateKey encryptionPrivateKey)
+AS2EncryptionAlgorithm encryptingAlgorithm,
+Certificate[] encryptingCertificateChain,
+PrivateKey encryptingPrivateKey)
 throws HttpException {
 
 Args.notNull(ediMessage, "EDI Message");
@@ -237,9 +237,9 @@ public HttpCoreContext send(String ediMessage,
 httpContext.setAttribute(AS2ClientManager.SIGNING_PRIVATE_KEY, 
signingPrivateKey);
 httpContext.setAttribute(AS2ClientManager.DISPOSITION_NOTIFICATION_TO, 
dispositionNotificationTo);
 
httpContext.setAttribute(AS2ClientManager.SIGNED_RECEIPT_MIC_ALGORITHMS, 
signedReceiptMicAlgorithms);
-httpContext.setAttribute(AS2ClientManager.ENCRYPTING_ALGORITHM, 
encryptionAlgorithm);
-
httpContext.setAttribute(AS2ClientManager.ENCRYPTING_CERTIFICATE_CHAIN, 
encryptionCertificateChain);
-httpContext.setAttribute(AS2ClientManager.ENCRYPTING_PRIVATE_KEY, 
encryptionPrivateKey);
+httpContext.setAttribute(AS2ClientManager.ENCRYPTING_ALGORITHM, 
encryptingAlgorithm);
+
httpContext.setAttribute(AS2ClientManager.ENCRYPTING_CERTIFICATE_CHAIN, 
encryptingCertificateChain);
+httpContext.setAttribute(AS2ClientManager.ENCRYPTING_PRIVATE_KEY, 
encryptingPrivateKey);
 
 BasicHttpEntityEnclosingRequest request = new 
BasicHttpEntityEnclosingRequest("POST", requestUri);
 httpContext.setAttribute(HTTP_REQUEST, request);
diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
index b2c3f46f1d7..60cee0682d0 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java
@@ -40,11 +40,13 @@
 import org.apache.http.HttpEntity;
 import 

[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-09-21 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16623108#comment-16623108
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd commented on issue #2526: [CAMEL-12605] Updated client integration tests
URL: https://github.com/apache/camel/pull/2526#issuecomment-423423439
 
 
   Merged on master. Thanks @punkhorn 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-09-21 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16623110#comment-16623110
 ] 

ASF GitHub Bot commented on CAMEL-12605:


Github user oscerd closed the pull request at:

https://github.com/apache/camel/pull/2526


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-09-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16622068#comment-16622068
 ] 

ASF GitHub Bot commented on CAMEL-12605:


GitHub user punkhorn opened a pull request:

https://github.com/apache/camel/pull/2526

[CAMEL-12605] Updated client integration tests



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/punkhorn/camel-upstream master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/2526.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2526


commit ff589dc13e836568a2c639bc4129c659ef987624
Author: William Collins 
Date:   2018-09-20T13:43:51Z

[CAMEL-12605] Updated client integration tests




> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-09-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16622066#comment-16622066
 ] 

ASF GitHub Bot commented on CAMEL-12605:


punkhorn opened a new pull request #2526: [CAMEL-12605] Updated client 
integration tests
URL: https://github.com/apache/camel/pull/2526
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-09-19 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16620227#comment-16620227
 ] 

ASF GitHub Bot commented on CAMEL-12605:


Github user oscerd closed the pull request at:

https://github.com/apache/camel/pull/2524


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


***UNCHECKED*** [jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-09-19 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16620225#comment-16620225
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd commented on issue #2524: [CAMEL-12605] Refactored encryption algorithms 
and added tests for al…
URL: https://github.com/apache/camel/pull/2524#issuecomment-422686937
 
 
   Merged. Thanks @punkhorn 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


***UNCHECKED*** [jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-09-19 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16620226#comment-16620226
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd closed pull request #2524: [CAMEL-12605] Refactored encryption 
algorithms and added tests for al…
URL: https://github.com/apache/camel/pull/2524
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2Algorithm.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2Algorithm.java
deleted file mode 100644
index 8e71f478ff2..000
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2Algorithm.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/**
- * 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.
- */
-package org.apache.camel.component.as2.api;
-
-import org.bouncycastle.asn1.ASN1ObjectIdentifier;
-import org.bouncycastle.cms.CMSAlgorithm;
-
-interface AS2AlgorithmConstants {
-static final String DES_CBC = "DES_CBC";
-static final String DES_EDE3_CBC = "DES_EDE3_CBC";
-static final String RC2_CBC = "RC2_CBC";
-static final String IDEA_CBC = "IDEA_CBC";
-static final String CAST5_CBC = "CAST5_CBC";
-static final String AES128_CBC = "AES128_CBC";
-static final String AES192_CBC = "AES192_CBC";
-static final String AES256_CBC = "AES256_CBC";
-static final String AES128_CCM = "AES128_CCM";
-static final String AES192_CCM = "AES192_CCM";
-static final String AES256_CCM = "AES256_CCM";
-static final String AES128_GCM = "AES128_GCM";
-static final String AES192_GCM = "AES192_GCM";
-static final String AES256_GCM = "AES256_GCM";
-static final String CAMELLIA128_CBC = "CAMELLIA128_CBC";
-static final String CAMELLIA192_CBC = "CAMELLIA192_CBC";
-static final String CAMELLIA256_CBC = "CAMELLIA256_CBC";
-static final String GOST28147_GCFB = "GOST28147_GCFB";
-static final String SEED_CBC = "SEED_CBC";
-static final String DES_EDE3_WRAP = "DES_EDE3_WRAP";
-static final String AES128_WRAP = "AES128_WRAP";
-static final String AES192_WRAP = "AES192_WRAP";
-static final String AES256_WRAP = "AES256_WRAP";
-static final String CAMELLIA128_WRAP = "CAMELLIA128_WRAP";
-static final String CAMELLIA192_WRAP = "CAMELLIA192_WRAP";
-static final String CAMELLIA256_WRAP = "CAMELLIA256_WRAP";
-static final String SEED_WRAP = "SEED_WRAP";
-static final String GOST28147_WRAP = "GOST28147_WRAP";
-static final String GOST28147_CRYPTOPRO_WRAP = "GOST28147_CRYPTOPRO_WRAP";
-static final String ECDH_SHA1KDF = "ECDH_SHA1KDF";
-static final String ECCDH_SHA1KDF = "ECCDH_SHA1KDF";
-static final String ECMQV_SHA1KDF = "ECMQV_SHA1KDF";
-static final String ECDH_SHA224KDF = "ECDH_SHA224KDF";
-static final String ECCDH_SHA224KDF = "ECCDH_SHA224KDF";
-static final String ECMQV_SHA224KDF = "ECMQV_SHA224KDF";
-static final String ECDH_SHA256KDF = "ECDH_SHA256KDF";
-static final String ECCDH_SHA256KDF = "ECCDH_SHA256KDF";
-static final String ECMQV_SHA256KDF = "ECMQV_SHA256KDF";
-static final String ECDH_SHA384KDF = "ECDH_SHA384KDF";
-static final String ECCDH_SHA384KDF = "ECCDH_SHA384KDF";
-static final String ECMQV_SHA384KDF = "ECMQV_SHA384KDF";
-static final String ECDH_SHA512KDF = "ECDH_SHA512KDF";
-static final String ECCDH_SHA512KDF = "ECCDH_SHA512KDF";
-static final String ECMQV_SHA512KDF = "ECMQV_SHA512KDF";
-static final String ECDHGOST3410_2001 = "ECDHGOST3410_2001";
-static final String ECDHGOST3410_2012_256 = "ECDHGOST3410_2012_256";
-static final String ECDHGOST3410_2012_512 = "ECDHGOST3410_2012_512";
-static final String SHA1 = "SHA1";
-static final String SHA224 = "SHA224";
-static final String SHA256 = "SHA256";
-static final String SHA384 = "SHA384";
-   

[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-09-18 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16619977#comment-16619977
 ] 

ASF GitHub Bot commented on CAMEL-12605:


GitHub user punkhorn opened a pull request:

https://github.com/apache/camel/pull/2524

[CAMEL-12605] Refactored encryption algorithms and added tests for al…

…l supported algorithms.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/punkhorn/camel-upstream master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/2524.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2524


commit 2d1ec468da5198c820b17fb691461f7524c8a5de
Author: William Collins 
Date:   2018-09-19T02:01:28Z

[CAMEL-12605] Refactored encryption algorithms and added tests for all 
supported algorithms.




> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-09-18 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16619976#comment-16619976
 ] 

ASF GitHub Bot commented on CAMEL-12605:


punkhorn opened a new pull request #2524: [CAMEL-12605] Refactored encryption 
algorithms and added tests for al…
URL: https://github.com/apache/camel/pull/2524
 
 
   …l supported algorithms.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-30 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16597097#comment-16597097
 ] 

ASF GitHub Bot commented on CAMEL-12605:


Github user oscerd closed the pull request at:

https://github.com/apache/camel/pull/2500


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-30 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16597096#comment-16597096
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd closed pull request #2500: [CAMEL-12605] Added test for enveloped 
request.
URL: https://github.com/apache/camel/pull/2500
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2MediaType.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2MediaType.java
index 08fbcd99d9a..d6c4934a657 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2MediaType.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2MediaType.java
@@ -26,6 +26,10 @@
  * Media Type for Application PKCS7 Signature
  */
 public static final String APPLICATION_PKCS7_SIGNATURE = 
"application/pkcs7-signature; name=smime.p7s; smime-type=signed-data";
+/**
+ * Media Type for Application PKCS7 Signature
+ */
+public static final String APPLICATION_PKCS7_MIME = 
"application/pkcs7-mime; name=smime.p7m; smime-type=enveloped-data; 
name=smime.p7m";
 /**
  * Media Type for Text/Plain Data
  */
diff --git 
a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java
 
b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java
index 65684b77bff..708c203315a 100644
--- 
a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java
+++ 
b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java
@@ -33,6 +33,7 @@
 import 
org.apache.camel.component.as2.api.entity.AS2MessageDispositionNotificationEntity;
 import org.apache.camel.component.as2.api.entity.ApplicationEDIEntity;
 import org.apache.camel.component.as2.api.entity.ApplicationEDIFACTEntity;
+import org.apache.camel.component.as2.api.entity.ApplicationPkcs7MimeEntity;
 import 
org.apache.camel.component.as2.api.entity.ApplicationPkcs7SignatureEntity;
 import org.apache.camel.component.as2.api.entity.DispositionMode;
 import 
org.apache.camel.component.as2.api.entity.DispositionNotificationMultipartReportEntity;
@@ -364,16 +365,17 @@ public void multipartSignedMessageTest() throws Exception 
{
 
 }
 
-//@Test
+@Test
 public void envelopeddMessageTest() throws Exception {
 AS2ClientConnection clientConnection = new 
AS2ClientConnection(AS2_VERSION, USER_AGENT, CLIENT_FQDN,
 TARGET_HOST, TARGET_PORT);
 AS2ClientManager clientManager = new 
AS2ClientManager(clientConnection);
 
 HttpCoreContext httpContext = clientManager.send(EDI_MESSAGE, 
REQUEST_URI, SUBJECT, FROM, AS2_NAME, AS2_NAME,
-AS2MessageStructure.SIGNED, 
ContentType.create(AS2MediaType.APPLICATION_EDIFACT, AS2Charset.US_ASCII),
+AS2MessageStructure.ENCRYPTED, 
ContentType.create(AS2MediaType.APPLICATION_EDIFACT, AS2Charset.US_ASCII),
 null, certList.toArray(new Certificate[0]), 
signingKP.getPrivate(), DISPOSITION_NOTIFICATION_TO,
-SIGNED_RECEIPT_MIC_ALGORITHMS, null, null, null);
+SIGNED_RECEIPT_MIC_ALGORITHMS, 
AS2AlgorithmConstants.AES128_CCM, certList.toArray(new Certificate[0]),
+signingKP.getPrivate());
 
 HttpRequest request = httpContext.getRequest();
 assertEquals("Unexpected method value", METHOD, 
request.getRequestLine().getMethod());
@@ -396,30 +398,22 @@ public void envelopeddMessageTest() throws Exception {
 assertNotNull("Date value missing", 
request.getFirstHeader(AS2Header.DATE));
 assertNotNull("Content length value missing", 
request.getFirstHeader(AS2Header.CONTENT_LENGTH));
 assertTrue("Unexpected content type for message",
-
request.getFirstHeader(AS2Header.CONTENT_TYPE).getValue().startsWith(AS2MediaType.MULTIPART_SIGNED));
+
request.getFirstHeader(AS2Header.CONTENT_TYPE).getValue().startsWith(AS2MimeType.APPLICATION_PKCS7_MIME));
 
 assertTrue("Request does not contain entity", request instanceof 
BasicHttpEntityEnclosingRequest);
 HttpEntity entity = ((BasicHttpEntityEnclosingRequest) 
request).getEntity();
 assertNotNull("Request does not contain entity", entity);
-assertTrue("Unexpected request entity type", entity instanceof 
MultipartSignedEntity);
-MultipartSignedEntity signedEntity = (MultipartSignedEntity) entity;
-

[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-30 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16597091#comment-16597091
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd commented on issue #2500: [CAMEL-12605] Added test for enveloped request.
URL: https://github.com/apache/camel/pull/2500#issuecomment-417202447
 
 
   Merged. Thanks @punkhorn 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16596594#comment-16596594
 ] 

ASF GitHub Bot commented on CAMEL-12605:


punkhorn commented on issue #2500: [CAMEL-12605] Added test for enveloped 
request.
URL: https://github.com/apache/camel/pull/2500#issuecomment-417025890
 
 
   @oscerd can you please take a look at this?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16596469#comment-16596469
 ] 

ASF GitHub Bot commented on CAMEL-12605:


punkhorn opened a new pull request #2500: [CAMEL-12605] Added test for 
enveloped request.
URL: https://github.com/apache/camel/pull/2500
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16596470#comment-16596470
 ] 

ASF GitHub Bot commented on CAMEL-12605:


GitHub user punkhorn opened a pull request:

https://github.com/apache/camel/pull/2500

[CAMEL-12605] Added test for enveloped request.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/punkhorn/camel-upstream master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/2500.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2500


commit 44b5d9347d8feec2070d0b2260771a725546729e
Author: William Collins 
Date:   2018-08-29T15:23:32Z

[CAMEL-12605] Added test for enveloped request.




> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16595979#comment-16595979
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd commented on issue #2495: [CAMEL-12605] Integrated encryption logic into 
component.
URL: https://github.com/apache/camel/pull/2495#issuecomment-416839830
 
 
   Thanks for the PR. Merged on master.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16595980#comment-16595980
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd closed pull request #2495: [CAMEL-12605] Integrated encryption logic 
into component.
URL: https://github.com/apache/camel/pull/2495
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2Algorithm.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2Algorithm.java
new file mode 100644
index 000..8e71f478ff2
--- /dev/null
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2Algorithm.java
@@ -0,0 +1,346 @@
+/**
+ * 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.
+ */
+package org.apache.camel.component.as2.api;
+
+import org.bouncycastle.asn1.ASN1ObjectIdentifier;
+import org.bouncycastle.cms.CMSAlgorithm;
+
+interface AS2AlgorithmConstants {
+static final String DES_CBC = "DES_CBC";
+static final String DES_EDE3_CBC = "DES_EDE3_CBC";
+static final String RC2_CBC = "RC2_CBC";
+static final String IDEA_CBC = "IDEA_CBC";
+static final String CAST5_CBC = "CAST5_CBC";
+static final String AES128_CBC = "AES128_CBC";
+static final String AES192_CBC = "AES192_CBC";
+static final String AES256_CBC = "AES256_CBC";
+static final String AES128_CCM = "AES128_CCM";
+static final String AES192_CCM = "AES192_CCM";
+static final String AES256_CCM = "AES256_CCM";
+static final String AES128_GCM = "AES128_GCM";
+static final String AES192_GCM = "AES192_GCM";
+static final String AES256_GCM = "AES256_GCM";
+static final String CAMELLIA128_CBC = "CAMELLIA128_CBC";
+static final String CAMELLIA192_CBC = "CAMELLIA192_CBC";
+static final String CAMELLIA256_CBC = "CAMELLIA256_CBC";
+static final String GOST28147_GCFB = "GOST28147_GCFB";
+static final String SEED_CBC = "SEED_CBC";
+static final String DES_EDE3_WRAP = "DES_EDE3_WRAP";
+static final String AES128_WRAP = "AES128_WRAP";
+static final String AES192_WRAP = "AES192_WRAP";
+static final String AES256_WRAP = "AES256_WRAP";
+static final String CAMELLIA128_WRAP = "CAMELLIA128_WRAP";
+static final String CAMELLIA192_WRAP = "CAMELLIA192_WRAP";
+static final String CAMELLIA256_WRAP = "CAMELLIA256_WRAP";
+static final String SEED_WRAP = "SEED_WRAP";
+static final String GOST28147_WRAP = "GOST28147_WRAP";
+static final String GOST28147_CRYPTOPRO_WRAP = "GOST28147_CRYPTOPRO_WRAP";
+static final String ECDH_SHA1KDF = "ECDH_SHA1KDF";
+static final String ECCDH_SHA1KDF = "ECCDH_SHA1KDF";
+static final String ECMQV_SHA1KDF = "ECMQV_SHA1KDF";
+static final String ECDH_SHA224KDF = "ECDH_SHA224KDF";
+static final String ECCDH_SHA224KDF = "ECCDH_SHA224KDF";
+static final String ECMQV_SHA224KDF = "ECMQV_SHA224KDF";
+static final String ECDH_SHA256KDF = "ECDH_SHA256KDF";
+static final String ECCDH_SHA256KDF = "ECCDH_SHA256KDF";
+static final String ECMQV_SHA256KDF = "ECMQV_SHA256KDF";
+static final String ECDH_SHA384KDF = "ECDH_SHA384KDF";
+static final String ECCDH_SHA384KDF = "ECCDH_SHA384KDF";
+static final String ECMQV_SHA384KDF = "ECMQV_SHA384KDF";
+static final String ECDH_SHA512KDF = "ECDH_SHA512KDF";
+static final String ECCDH_SHA512KDF = "ECCDH_SHA512KDF";
+static final String ECMQV_SHA512KDF = "ECMQV_SHA512KDF";
+static final String ECDHGOST3410_2001 = "ECDHGOST3410_2001";
+static final String ECDHGOST3410_2012_256 = "ECDHGOST3410_2012_256";
+static final String ECDHGOST3410_2012_512 = "ECDHGOST3410_2012_512";
+static final String SHA1 = "SHA1";
+static final String SHA224 = "SHA224";
+static final String SHA256 = "SHA256";
+static final String SHA384 = "SHA384";
+static final 

[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16595981#comment-16595981
 ] 

ASF GitHub Bot commented on CAMEL-12605:


Github user oscerd closed the pull request at:

https://github.com/apache/camel/pull/2495


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-28 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16595206#comment-16595206
 ] 

ASF GitHub Bot commented on CAMEL-12605:


GitHub user punkhorn opened a pull request:

https://github.com/apache/camel/pull/2495

[CAMEL-12605] Integrated encryption logic into component.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/punkhorn/camel-upstream master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/2495.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2495


commit 5e55c4137bce2b109c544ce1182f915cf074adee
Author: William Collins 
Date:   2018-08-28T15:59:25Z

[CAMEL-12605] Integrated encryption logic into component.




> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-28 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16595205#comment-16595205
 ] 

ASF GitHub Bot commented on CAMEL-12605:


punkhorn opened a new pull request #2495: [CAMEL-12605] Integrated encryption 
logic into component.
URL: https://github.com/apache/camel/pull/2495
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16591219#comment-16591219
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd commented on issue #2493: CAMEL-12605] Added encrypt/decrypt logic for 
enveloped entities
URL: https://github.com/apache/camel/pull/2493#issuecomment-415667978
 
 
   Thanks, merged on master


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16591221#comment-16591221
 ] 

ASF GitHub Bot commented on CAMEL-12605:


Github user oscerd closed the pull request at:

https://github.com/apache/camel/pull/2493


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16591220#comment-16591220
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd closed pull request #2493: CAMEL-12605] Added encrypt/decrypt logic for 
enveloped entities
URL: https://github.com/apache/camel/pull/2493
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
index e0812898c2a..4e22e7baf77 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientManager.java
@@ -275,4 +275,20 @@ public AS2SignedDataGenerator 
createSigningGenerator(HttpCoreContext httpContext
 
 }
 
+public AS2SignedDataGenerator createEncryptingGenerator(HttpCoreContext 
httpContext) throws HttpException {
+
+Certificate[] certificateChain = 
httpContext.getAttribute(SIGNING_CERTIFICATE_CHAIN, Certificate[].class);
+if (certificateChain == null) {
+throw new HttpException("Signing certificate chain missing");
+}
+
+PrivateKey privateKey = httpContext.getAttribute(SIGNING_PRIVATE_KEY, 
PrivateKey.class);
+if (privateKey == null) {
+throw new HttpException("Signing private key missing");
+}
+
+return SigningUtils.createSigningGenerator(certificateChain, 
privateKey);
+
+}
+
 }
diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2SignedDataGenerator.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2SignedDataGenerator.java
index f52429a4d7f..1ab44c061c4 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2SignedDataGenerator.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2SignedDataGenerator.java
@@ -108,6 +108,7 @@ public AS2SignedDataGenerator() {
 /**
  * Creates a multipart/signed content type containing the 
algorithms used by this generator.
  *
+ * @param boundary - boundary to use to demarcate content.
  * @return A multipart/signed content type
  */
 public ContentType createMultipartSignedContentType(String boundary) {
diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7Mime.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7MimeEntity.java
similarity index 72%
rename from 
components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7Mime.java
rename to 
components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7MimeEntity.java
index 88d70b673ad..b61b440244b 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7Mime.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7MimeEntity.java
@@ -16,38 +16,50 @@
  */
 package org.apache.camel.component.as2.api.entity;
 
+import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.OutputStream;
+import java.security.PrivateKey;
+import java.util.Collection;
+import java.util.Iterator;
 
 import org.apache.camel.component.as2.api.AS2Charset;
 import org.apache.camel.component.as2.api.AS2Header;
 import org.apache.camel.component.as2.api.CanonicalOutputStream;
+import org.apache.camel.component.as2.api.io.AS2SessionInputBuffer;
+import org.apache.camel.component.as2.api.util.EntityUtils;
 import org.apache.http.Header;
 import org.apache.http.HeaderIterator;
 import org.apache.http.HttpException;
 import org.apache.http.entity.ContentType;
+import org.apache.http.impl.io.HttpTransportMetricsImpl;
 import org.apache.http.message.BasicNameValuePair;
 import org.apache.http.util.Args;
 import org.bouncycastle.cms.CMSEnvelopedData;
 import org.bouncycastle.cms.CMSEnvelopedDataGenerator;
 import org.bouncycastle.cms.CMSProcessableByteArray;
 import org.bouncycastle.cms.CMSTypedData;
+import org.bouncycastle.cms.Recipient;
+import org.bouncycastle.cms.RecipientInformation;
+import org.bouncycastle.cms.RecipientInformationStore;
+import 

[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-24 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16591199#comment-16591199
 ] 

ASF GitHub Bot commented on CAMEL-12605:


oscerd commented on issue #2493: CAMEL-12605] Added encrypt/decrypt logic for 
enveloped entities
URL: https://github.com/apache/camel/pull/2493#issuecomment-415662613
 
 
   I'm merging.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-23 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16590398#comment-16590398
 ] 

ASF GitHub Bot commented on CAMEL-12605:


punkhorn opened a new pull request #2493: CAMEL-12605] Added encrypt/decrypt 
logic for enveloped entities
URL: https://github.com/apache/camel/pull/2493
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-23 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16590399#comment-16590399
 ] 

ASF GitHub Bot commented on CAMEL-12605:


GitHub user punkhorn opened a pull request:

https://github.com/apache/camel/pull/2493

CAMEL-12605] Added encrypt/decrypt logic for enveloped entities



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/punkhorn/camel-upstream master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/2493.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2493


commit 105e7dcb8a5bfa08edf4a900f94c19880ca4cecf
Author: William Collins 
Date:   2018-08-23T15:43:24Z

CAMEL-12605] Added encrypt/decrypt logic for enveloped entities




> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-21 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16587013#comment-16587013
 ] 

ASF GitHub Bot commented on CAMEL-12605:


davsclaus closed pull request #2489: [CAMEL-12605] First cut at mime envelope 
entity
URL: https://github.com/apache/camel/pull/2489
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7Mime.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7Mime.java
new file mode 100644
index 000..88d70b673ad
--- /dev/null
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/ApplicationPkcs7Mime.java
@@ -0,0 +1,106 @@
+/**
+ * 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.
+ */
+package org.apache.camel.component.as2.api.entity;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.camel.component.as2.api.AS2Charset;
+import org.apache.camel.component.as2.api.AS2Header;
+import org.apache.camel.component.as2.api.CanonicalOutputStream;
+import org.apache.http.Header;
+import org.apache.http.HeaderIterator;
+import org.apache.http.HttpException;
+import org.apache.http.entity.ContentType;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.Args;
+import org.bouncycastle.cms.CMSEnvelopedData;
+import org.bouncycastle.cms.CMSEnvelopedDataGenerator;
+import org.bouncycastle.cms.CMSProcessableByteArray;
+import org.bouncycastle.cms.CMSTypedData;
+import org.bouncycastle.operator.OutputEncryptor;
+
+public class ApplicationPkcs7Mime extends MimeEntity {
+
+private static final String CONTENT_DISPOSITION = "attachment; 
filename=\"smime.p7m\"";
+
+private byte[] encryptedData;
+
+public ApplicationPkcs7Mime(MimeEntity entity2Encrypt,
+CMSEnvelopedDataGenerator dataGenerator,
+OutputEncryptor encryptor,
+String encryptedContentTransferEncoding,
+boolean isMainBody)
+throws HttpException {
+setContentType(ContentType.create("application/pkcs7-mime", new 
BasicNameValuePair("smime-type", "enveloped-datat"),
+new BasicNameValuePair("name", "smime.p7m")));
+setContentTransferEncoding(encryptedContentTransferEncoding);
+addHeader(AS2Header.CONTENT_DISPOSITION, CONTENT_DISPOSITION);
+setMainBody(isMainBody);
+try {
+this.encryptedData = createEncryptedData(entity2Encrypt, 
dataGenerator, encryptor);
+} catch (Exception e) {
+throw new HttpException("Failed to create encrypted data");
+}
+}
+
+public ApplicationPkcs7Mime(byte[] encryptedData, String 
encryptedContentTransferEncoding, boolean isMainBody) {
+this.encryptedData = Args.notNull(encryptedData, "encryptedData");
+
+setContentType(ContentType.create("application/pkcs7-mime", new 
BasicNameValuePair("smime-type", "enveloped-datat"),
+new BasicNameValuePair("name", "smime.p7m")));
+setContentTransferEncoding(encryptedContentTransferEncoding);
+addHeader(AS2Header.CONTENT_DISPOSITION, CONTENT_DISPOSITION);
+setMainBody(isMainBody);
+}
+
+@Override
+public void writeTo(OutputStream outstream) throws IOException {
+NoCloseOutputStream ncos = new NoCloseOutputStream(outstream);
+
+// Write out mime part headers if this is not the main body of message.
+if (!isMainBody()) {
+try (CanonicalOutputStream canonicalOutstream = new 
CanonicalOutputStream(ncos, AS2Charset.US_ASCII)) {
+
+HeaderIterator it = headerIterator();
+while (it.hasNext()) {

[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-21 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16587014#comment-16587014
 ] 

ASF GitHub Bot commented on CAMEL-12605:


Github user davsclaus closed the pull request at:

https://github.com/apache/camel/pull/2489


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16586364#comment-16586364
 ] 

ASF GitHub Bot commented on CAMEL-12605:


punkhorn opened a new pull request #2489: [CAMEL-12605] First cut at mime 
envelope entity
URL: https://github.com/apache/camel/pull/2489
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16586365#comment-16586365
 ] 

ASF GitHub Bot commented on CAMEL-12605:


GitHub user punkhorn opened a pull request:

https://github.com/apache/camel/pull/2489

[CAMEL-12605] First cut at mime envelope entity



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/punkhorn/camel-upstream master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/2489.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2489


commit 86ca4bcc9f33d4a2533306fc820670c2cf5bc945
Author: William Collins 
Date:   2018-08-20T18:41:28Z

[CAMEL-12605] First cut at mime envelope entity




> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-18 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16584661#comment-16584661
 ] 

ASF GitHub Bot commented on CAMEL-12605:


Github user davsclaus closed the pull request at:

https://github.com/apache/camel/pull/2482


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-18 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16584660#comment-16584660
 ] 

ASF GitHub Bot commented on CAMEL-12605:


davsclaus closed pull request #2482: [CAMEL-12605] Refactored name and package 
of AS2 utilities
URL: https://github.com/apache/camel/pull/2482
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/RequestAS2.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/RequestAS2.java
index be1ee6a4bb6..852067c7710 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/RequestAS2.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/RequestAS2.java
@@ -22,7 +22,7 @@
 import org.apache.camel.component.as2.api.AS2Constants;
 import org.apache.camel.component.as2.api.AS2Header;
 import org.apache.camel.component.as2.api.InvalidAS2NameException;
-import org.apache.camel.component.as2.api.Util;
+import org.apache.camel.component.as2.api.util.AS2Utils;
 import org.apache.http.HttpException;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpRequestInterceptor;
@@ -61,7 +61,7 @@ public void process(HttpRequest request, HttpContext context) 
throws HttpExcepti
 /* AS2-From header */
 String as2From = coreContext.getAttribute(AS2ClientManager.AS2_FROM, 
String.class);
 try {
-Util.validateAS2Name(as2From);
+AS2Utils.validateAS2Name(as2From);
 } catch (InvalidAS2NameException e) {
 throw new HttpException("Invalid AS-From name", e);
 }
@@ -70,7 +70,7 @@ public void process(HttpRequest request, HttpContext context) 
throws HttpExcepti
 /* AS2-To header */
 String as2To = coreContext.getAttribute(AS2ClientManager.AS2_TO, 
String.class);
 try {
-Util.validateAS2Name(as2To);
+AS2Utils.validateAS2Name(as2To);
 } catch (InvalidAS2NameException e) {
 throw new HttpException("Invalid AS-To name", e);
 }
@@ -78,7 +78,7 @@ public void process(HttpRequest request, HttpContext context) 
throws HttpExcepti
 
 /* Message-Id header*/
 // SHOULD be set to aid in message reconciliation
-request.addHeader(AS2Header.MESSAGE_ID, 
Util.createMessageId(clientFQDN));
+request.addHeader(AS2Header.MESSAGE_ID, 
AS2Utils.createMessageId(clientFQDN));
 }
 
 }
diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/RequestAsynchronousMDN.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/RequestAsynchronousMDN.java
index c4276288675..ed03fbbf820 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/RequestAsynchronousMDN.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/RequestAsynchronousMDN.java
@@ -21,7 +21,7 @@
 import org.apache.camel.component.as2.api.AS2AsynchronousMDNManager;
 import org.apache.camel.component.as2.api.AS2Constants;
 import org.apache.camel.component.as2.api.AS2Header;
-import org.apache.camel.component.as2.api.Util;
+import org.apache.camel.component.as2.api.util.AS2Utils;
 import org.apache.http.HttpException;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpRequestInterceptor;
@@ -51,7 +51,7 @@ public void process(HttpRequest request, HttpContext context) 
throws HttpExcepti
 
 /* Message-Id header */
 // SHOULD be set to aid in message reconciliation
-request.addHeader(AS2Header.MESSAGE_ID, 
Util.createMessageId(senderFQDN));
+request.addHeader(AS2Header.MESSAGE_ID, 
AS2Utils.createMessageId(senderFQDN));
 
 /* Recipient-Address header */
 String recipientAddress = 
coreContext.getAttribute(AS2AsynchronousMDNManager.RECIPIENT_ADDRESS, 
String.class);
diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/ResponseMDN.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/ResponseMDN.java
index 98a72fa0400..e0aecbdf81d 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/ResponseMDN.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/ResponseMDN.java
@@ -28,13 +28,13 @@
 import org.apache.camel.component.as2.api.AS2SignedDataGenerator;
 import 

[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16584104#comment-16584104
 ] 

ASF GitHub Bot commented on CAMEL-12605:


punkhorn opened a new pull request #2482: [CAMEL-12605] Refactored name and 
package of AS2 utilities
URL: https://github.com/apache/camel/pull/2482
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16584105#comment-16584105
 ] 

ASF GitHub Bot commented on CAMEL-12605:


GitHub user punkhorn opened a pull request:

https://github.com/apache/camel/pull/2482

[CAMEL-12605] Refactored name and package of AS2 utilities



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/punkhorn/camel-upstream master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/2482.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2482


commit 63cdc75ac21e0e232f2522816dd47fe9d1090982
Author: William Collins 
Date:   2018-08-17T15:47:15Z

[CAMEL-12605] Refactored name and package of AS2 utilities




> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16584031#comment-16584031
 ] 

ASF GitHub Bot commented on CAMEL-12605:


davsclaus commented on issue #2481: [CAMEL-12605] Refactored name and package 
of AS2 utilities
URL: https://github.com/apache/camel/pull/2481#issuecomment-413891174
 
 
   Ups this PR you need to rename the classes and where its in use. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16584028#comment-16584028
 ] 

ASF GitHub Bot commented on CAMEL-12605:


Github user davsclaus closed the pull request at:

https://github.com/apache/camel/pull/2481


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16584027#comment-16584027
 ] 

ASF GitHub Bot commented on CAMEL-12605:


davsclaus closed pull request #2481: [CAMEL-12605] Refactored name and package 
of AS2 utilities
URL: https://github.com/apache/camel/pull/2481
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/Util.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/AS2Utils.java
similarity index 100%
rename from 
components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/Util.java
rename to 
components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/AS2Utils.java


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16584014#comment-16584014
 ] 

ASF GitHub Bot commented on CAMEL-12605:


GitHub user punkhorn opened a pull request:

https://github.com/apache/camel/pull/2481

[CAMEL-12605] Refactored name and package of AS2 utilities



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/punkhorn/camel-upstream master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/2481.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2481


commit 644c3b79529e7350a243cae154075fdeb1c3778a
Author: William Collins 
Date:   2018-08-17T14:37:17Z

[CAMEL-12605] Refactored name and package of AS2 utilities




> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12605) Enhance the AS2 Component to send and receive encrypted AS2 messages

2018-08-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16584013#comment-16584013
 ] 

ASF GitHub Bot commented on CAMEL-12605:


punkhorn opened a new pull request #2481: [CAMEL-12605] Refactored name and 
package of AS2 utilities
URL: https://github.com/apache/camel/pull/2481
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Enhance the AS2 Component to send and receive encrypted AS2 messages
> 
>
> Key: CAMEL-12605
> URL: https://issues.apache.org/jira/browse/CAMEL-12605
> Project: Camel
>  Issue Type: Improvement
>Affects Versions: 2.23.0
>Reporter: William Collins
>Assignee: William Collins
>Priority: Major
>
> Enhance the AS2 Component to support encrypted AS2 messages per RFC4130



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)