phax / as2-server

A standalone Java AS2 server - see as2-lib for the generic parts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not able to sign messages in anything other than sha1

mreinigjr opened this issue · comments

Hi Philip,

Good Morning from Missouri, USA and Good Evening in Austria. :)

Have you ever tested your software against Mendelson's test server (here are details: http://as2.mendelson-e-c.com/)? I am able to send them messages just fine if I stick to their specs exactly and request back an mdn signed using sha1, but if I sign the message in something other than sha1, then they do not recognize that the other algorithm has been used but rather they recognize that sha1 was used when it was not. Even weirder, signature validation passes on their end when I use md5 and they recognize it as sha1. I think as2-lib is still signing messages in sha1 regardless of what I specify in the partnership.xml file, same with checking signatures. Basically, I think it might be stuck in sha1 mode, or not parsing the partnership.xml file correctly and is defaulting to sha1. I have used other software in the past and signed messages using sha256 with Mendelson just fine and received signed MDNs from them in sha256 as well, so the tests I am doing with Mendelson should work.

Thanks,
Michael

Hello Michael!

In general it should be possible to sign with all the algorithms stated in the enum ECryptoAlgorithmSign. I quickly checked the code and could not find any fallback to SHA1.
Nevertheless I must admit, I never tested it against the Mendelson test server, but I will probably do that.

The official AS2 RFC allows only for SHA1 and MD5. I added the SHA256 etc. identifiers (e.g. "sha256") without cross checking them somewhere. Do you know any official RFC where the extended signing algorithm IDs are stated? Maybe Mendelson expects something like "sha-256" or "sha2-256" etc...

Thanks, Philip

Short note on the Mendelson test server: they are claiming the following:

If you would like to test your AS2 server against the mendelson AS2 test server please use the following settings before sending messages:

    MDN: sync
    URL: http://testas2.mendelson-e-c.com:8080/as2/HttpReceiver
    Signature: Necessary, SHA-1
    Encryption: Necessary, 3DES
    Sender AS2 id (your id): mycompanyAS2
    Sender key (your key): (format pkcs#12, keystore pass "test"): Key1
    Receiver AS2 id (test servers id): mendelsontestAS2
    Receiver certificate (test servers certificate): (format PEM): Key2

-> so you might be stuck with SHA1...

Hi Philip,

Thanks!

Using this library (https://github.com/abhishek-ram/pyas2) I have been able to sign messages in sha256 with Mendelson and receive mdn's back signed in sha256. I ultimately moved away from this library because it uses the python wrapper m2crypto to access openssl. Unfortunately, m2crypto does not give you anyway to change the signing algorithm from sha256 to sha1, and the company I am trying to send as2 messages to currently uses software that only supports sha1 or md5.

I tried using md5 with Mendelson as well, we know that one is just "md5", and I still get the same issue. I was only using sha256 as an example because I have been able to do it before. I still have an instance of pyas2 up and I will see how it specifies sha256.

Do you think the issue could be in the header of the message?

Doing a test between OpenAS2A and OpenAS2B in both ways works. OpenAS2A-OpenAS2B already had specified md5, and this works just find, so it might be in how Mendelson is interrupting the headers built by as2-lib.

Also, I may have forgotten to mention that if I request back an MDN signed with something other than sha1, Mendelson will recognize that and sign the MDN as requested, but the mic check fails in as2-server.

Thanks,
Michael

Seems like they are using "sha-256" for SHA 256.
If you log into http://testas2.mendelson-e-c.com:8080/webas2/ (guest/guest) and check for older messages, you see one with "sha-256" as micalg.

Try using "signed-receipt-micalg=optional, sha-256" as an example MDN request

good catch! I will adjust on my side and let you know how the test goes. Strange about md5 though. I will play with that one too.

getting this error:

[2015-08-14T12:20:52,585] [AS2-SERVER] [WARN ] [Timer-3] The passed MIC algorithm 'sha-256' is unsupported! -- com.helger.as2lib.disposition.DispositionOptions.setMICAlg(DispositionOptions.java:200)

should be an easy fix. I can test on myside

I changed to trunk, and changed the identifiers...

Today I'm very sorry but have other plans than working tonight. I will come back to you on the next days... Good luck!

Thanks Philip! No problem at all. I really do appreciate the attention you have been providing here. I will post anything new to keep you posted. I hope you enjoy your weekend.

Thanks, you too :)

Test is failing during as2-lib build:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.helger.as2lib.SPITest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032 sec - in com.helger.as2lib.SPITest
Running com.helger.as2lib.params.CompositeParametersTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.06 sec - in com.helger.as2lib.params.CompositeParametersTest
Running com.helger.as2lib.disposition.DispositionOptionsTest
[main] WARN com.helger.as2lib.disposition.DispositionOptions - The passed MIC algorithm 'sha512' is unsupported!
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.296 sec <<< FAILURE! - in com.helger.as2lib.disposition.DispositionOptionsTest
testParsing(com.helger.as2lib.disposition.DispositionOptionsTest)  Time elapsed: 0.289 sec  <<< FAILURE!
java.lang.AssertionError: expected:<sha512> but was:<null>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:834)
    at org.junit.Assert.assertEquals(Assert.java:118)
    at org.junit.Assert.assertEquals(Assert.java:144)
    at com.helger.as2lib.disposition.DispositionOptionsTest.testParsing(DispositionOptionsTest.java:105)


Results :

Failed tests: 
  DispositionOptionsTest.testParsing:105 expected:<sha512> but was:<null>

Tests run: 3, Failures: 1, Errors: 0, Skipped: 0

Add -DskipTests=true to the maven cmdline

Am 14. August 2015 18:44:51 MESZ, schrieb Michael Reinig notifications@github.com:

Test is failing during build:

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.helger.as2lib.SPITest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032
sec - in com.helger.as2lib.SPITest
Running com.helger.as2lib.params.CompositeParametersTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.06
sec - in com.helger.as2lib.params.CompositeParametersTest
Running com.helger.as2lib.disposition.DispositionOptionsTest
[main] WARN com.helger.as2lib.disposition.DispositionOptions - The
passed MIC algorithm 'sha512' is unsupported!
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.296
sec <<< FAILURE! - in
com.helger.as2lib.disposition.DispositionOptionsTest
testParsing(com.helger.as2lib.disposition.DispositionOptionsTest)  Time
elapsed: 0.289 sec  <<< FAILURE!
java.lang.AssertionError: expected:<sha512> but was:<null>
  at org.junit.Assert.fail(Assert.java:88)
  at org.junit.Assert.failNotEquals(Assert.java:834)
  at org.junit.Assert.assertEquals(Assert.java:118)
  at org.junit.Assert.assertEquals(Assert.java:144)
  at
com.helger.as2lib.disposition.DispositionOptionsTest.testParsing(DispositionOptionsTest.java:105)


Results :

Failed tests: 
DispositionOptionsTest.testParsing:105 expected:<sha512> but was:<null>

Tests run: 3, Failures: 1, Errors: 0, Skipped: 0

Reply to this email directly or view it on GitHub:
#9 (comment)

Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

test is fixed. Any news?

Hi Philip,

As soon as I skipped the tests as you suggested, I got called into meetings and had to take care of far less fun things for the rest of the day. :)

I just did some testing and still the same issue. My message on Mendelson's test server is:

ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2

and my log output is:

[2015-08-15T09:23:47,948] [AS2-SERVER] [DEBUG] [Timer-3] AS2Message was created -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:223)
[2015-08-15T09:23:47,951] [AS2-SERVER] [DEBUG] [Timer-3] Formatting 'application/EDI-X12' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:141)
[2015-08-15T09:23:47,951] [AS2-SERVER] [DEBUG] [Timer-3] Formatted value is now 'application/EDI-X12' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:174)
[2015-08-15T09:23:47,971] [AS2-SERVER] [DEBUG] [Timer-3] Updating partnership for AS2 message null -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.updateMessage(AbstractDirectoryPollingModule.java:386)
[2015-08-15T09:23:47,983] [AS2-SERVER] [DEBUG] [Timer-3] Updating partnership [Partnership@0x349db23e: name=mycompanyAS2-mendelsontestAS2; senderIDs=[StringMap@0x584ad2ec: attrs={name=mycompanyAS2, as2_id=mycompanyAS2, x509_alias=mycompanyAS2, email=mycompanyAS2}]; receiverIDs=[StringMap@0x065886e0: attrs={name=mendelsontestAS2, as2_id=mendelsontestAS2, x509_alias=mendelsontestAS2, email=mendelsontestAS2}]; attributes=[StringMap@0x0d472760: attrs={protocol=as2, subject=TEST, as2_url=http://testas2.mendelson-e-c.com:8080/as2/HttpReceiver, as2_mdn_to=http://104.236.58.252:10080/HttpReceiver, as2_mdn_options=signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha-256, encrypt=3des, sign=sha-256}]] -- com.helger.as2lib.partner.AbstractPartnershipFactory.updatePartnership(AbstractPartnershipFactory.java:319)
[2015-08-15T09:23:47,983] [AS2-SERVER] [DEBUG] [Timer-3] Formatting 'TEST' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:141)
[2015-08-15T09:23:47,991] [AS2-SERVER] [DEBUG] [Timer-3] Formatted value is now 'TEST' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:174)
[2015-08-15T09:23:47,991] [AS2-SERVER] [DEBUG] [Timer-3] Finished updating partnership for AS2 message -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.updateMessage(AbstractDirectoryPollingModule.java:392)
[2015-08-15T09:23:47,993] [AS2-SERVER] [DEBUG] [Timer-3] Formatting 'ph-OpenAS2-$date.ddMMyyyyHHmmssZ$-$rand.1234$@$msg.sender.as2_id$_$msg.receiver.as2_id$' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:141)
[2015-08-15T09:23:47,995] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: DateParameters with 'ddMMyyyyHHmmssZ' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T09:23:47,996] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: RandomParameters with '1234' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T09:23:47,999] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: MessageParameters with 'sender.as2_id' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T09:23:47,999] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: MessageParameters with 'receiver.as2_id' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T09:23:47,999] [AS2-SERVER] [DEBUG] [Timer-3] Formatted value is now 'ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:174)
[2015-08-15T09:23:48,000] [AS2-SERVER] [DEBUG] [Timer-3] Updated message ID to <ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2> -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.updateMessage(AbstractDirectoryPollingModule.java:397)
[2015-08-15T09:23:48,000] [AS2-SERVER] [INFO ] [Timer-3] file assigned to message /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt [<ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:228)
[2015-08-15T09:23:48,006] [AS2-SERVER] [DEBUG] [Timer-3] DefaultMessageProcessor.handle (send,[AS2Message@0x46a51997: data=javax.mail.internet.MimeBodyPart@4fb05a98; MDN=null; history=com.helger.as2lib.message.DataHistory@1a50587],null) -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:128)
[2015-08-15T09:23:48,007] [AS2-SERVER] [DEBUG] [Timer-3]   handling with module [[AS2SenderModule@0x5a0b0ffb: attrs={classname=com.helger.as2lib.processor.sender.AS2SenderModule}]] -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:139)
[2015-08-15T09:23:48,007] [AS2-SERVER] [INFO ] [Timer-3] message submitted:  [<ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:133)
[2015-08-15T09:23:48,235] [AS2-SERVER] [DEBUG] [Timer-3] Signed data [<ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.secure(AS2SenderModule.java:432)
[2015-08-15T09:23:48,328] [AS2-SERVER] [DEBUG] [Timer-3] Encrypted data [<ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.secure(AS2SenderModule.java:450)
[2015-08-15T09:23:48,470] [AS2-SERVER] [INFO ] [Timer-3] connecting to http://testas2.mendelson-e-c.com:8080/as2/HttpReceiver [<ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:176)
[2015-08-15T09:23:48,835] [AS2-SERVER] [INFO ] [Timer-3] transferred 2742 bytes in 0.089 seconds at 30.89 KBps [<ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:188)
[2015-08-15T09:23:49,616] [AS2-SERVER] [DEBUG] [Timer-3] DefaultMessageProcessor.handle (storemdn,[AS2Message@0x46a51997: data=javax.mail.internet.MimeBodyPart@4fb05a98; MDN=[[AS2MessageMDN@0x1a3f904e: attributes=[StringMap@0x25d8a6c7: attrs={REPORTING_UA=mendelson AS2 Server, ORIGINAL_RECIPIENT=rfc822; mendelsontestAS2, FINAL_RECIPIENT=rfc822; mendelsontestAS2, ORIGINAL_MESSAGE_ID=<ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2>, DISPOSITION=automatic-action/MDN-sent-automatically; processed, MIC=LPcP3NNUk4zoskkndlHaVQNrGIM=, sha1}]; headers=javax.mail.internet.InternetHeaders@34947d29; partnership=[Partnership@0x317737d8: name=mendelsontestAS2-mycompanyAS2; senderIDs=[StringMap@0x57ac6c58: attrs={name=mendelsontestAS2, as2_id=mendelsontestAS2, x509_alias=mendelsontestAS2, email=mendelsontestAS2}]; receiverIDs=[StringMap@0x372216f4: attrs={name=mycompanyAS2, as2_id=mycompanyAS2, x509_alias=mycompanyAS2, email=mycompanyAS2}]; attributes=[StringMap@0x20c8580c: attrs={protocol=as2, subject=TEST, as2_url=http://as2.meinc.com/incoming, as2_mdn_to=http://testas2.mendelson-e-c.com:8080/as2/HttpReceiver, as2_mdn_options=signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, md5, encrypt=3des, sign=md5}]]]; message=<ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2>; data=javax.mail.internet.MimeBodyPart@2889723a; text=The AS2 message has been received.]; history=com.helger.as2lib.message.DataHistory@1a50587],null) -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:128)
[2015-08-15T09:23:49,617] [AS2-SERVER] [DEBUG] [Timer-3]   handling with module [[MDNFileModule@0x1c7315df: attrs={classname=com.helger.as2lib.processor.storage.MDNFileModule, filename=data/mdn/$date.yyyy$/$date.MM$/$mdn.msg.sender.as2_id$-$mdn.msg.receiver.as2_id$-$mdn.msg.headers.message-id$, protocol=as2, tempdir=data/temp}]] -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:139)
[2015-08-15T09:23:49,618] [AS2-SERVER] [DEBUG] [Timer-3] Formatting 'data/mdn/$date.yyyy$/$date.MM$/$mdn.msg.sender.as2_id$-$mdn.msg.receiver.as2_id$-$mdn.msg.headers.message-id$' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:141)
[2015-08-15T09:23:49,618] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: DateParameters with 'yyyy' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T09:23:49,623] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: DateParameters with 'MM' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T09:23:49,626] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: MessageMDNParameters with 'msg.sender.as2_id' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T09:23:49,627] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: MessageMDNParameters with 'msg.receiver.as2_id' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T09:23:49,627] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: MessageMDNParameters with 'msg.headers.message-id' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T09:23:49,628] [AS2-SERVER] [DEBUG] [Timer-3] Formatted value is now 'data/mdn/2015/08/mycompanyAS2-mendelsontestAS2-<ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2>' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:174)
[2015-08-15T09:23:49,628] [AS2-SERVER] [DEBUG] [Timer-3] File operation CREATE_DIR_RECURSIVE succeeded on 'data/mdn/2015/08' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-15T09:23:49,644] [AS2-SERVER] [DEBUG] [Timer-3] File operation CREATE_DIR_RECURSIVE succeeded on 'data/temp' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-15T09:23:49,646] [AS2-SERVER] [DEBUG] [Timer-3] File operation RENAME_FILE succeeded on 'data/temp/mycompanyAS2-mendelsontestAS2-_ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2_' and 'data/mdn/2015/08/mycompanyAS2-mendelsontestAS2-_ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2_' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-15T09:23:49,648] [AS2-SERVER] [INFO ] [Timer-3] stored MDN to /home/mreinigjr/as2-server/data/mdn/2015/08/mycompanyAS2-mendelsontestAS2-_ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2_ -- com.helger.as2lib.processor.storage.MDNFileModule.handle(MDNFileModule.java:84)
[2015-08-15T09:23:49,654] [AS2-SERVER] [INFO ] [Timer-3] received MDN [automatic-action/MDN-sent-automatically; processed] [<ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.receiveMDN(AS2SenderModule.java:334)
[2015-08-15T09:23:49,655] [AS2-SERVER] [INFO ] [Timer-3] mic is not matched, original mic: ymUncV9GIsphxl5iM0DJlz4rjHzOVq38dS95FU/unS8=, sha-256 return mic: LPcP3NNUk4zoskkndlHaVQNrGIM=, sha1 [<ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.receiveMDN(AS2SenderModule.java:347)
[2015-08-15T09:23:49,657] [AS2-SERVER] [INFO ] [Timer-3] message sent [<ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:214)
[2015-08-15T09:23:49,657] [AS2-SERVER] [DEBUG] [Timer-3] AS2Message was successfully handled my the MessageProcessor -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:237)
[2015-08-15T09:23:49,657] [AS2-SERVER] [DEBUG] [Timer-3] Trying to delete file /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:290)
[2015-08-15T09:23:49,662] [AS2-SERVER] [INFO ] [Timer-3] deleted /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt [<ph-OpenAS2-15082015092347-0400-4505@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:297)

The log entry with "mic is not matched" is the problem. Also, here is my partnership.xml file:

<partnerships>
        <partner name="OpenAS2A"
                as2_id="OpenAS2A"
                x509_alias="OpenAS2A"
                email="OpenAS2 A email"/>
        <partner name="OpenAS2B"
                as2_id="OpenAS2B"
                x509_alias="OpenAS2B"
                email="OpenAS2 A email"/>
        <partner name="mendelsontestAS2"
                as2_id="mendelsontestAS2"
                x509_alias="mendelsontestAS2"
                email="mendelsontestAS2"/>
        <partner name="mycompanyAS2"
                as2_id="mycompanyAS2"
                x509_alias="mycompanyAS2"
                email="mycompanyAS2"/>

        <partnership name="OpenAS2A-OpenAS2B">
                <sender name="OpenAS2A"/>
                <receiver name="OpenAS2B"/>
                <attribute name="protocol" value="as2"/>
                <attribute name="subject" value="From OpenAS2A to OpenAS2B"/>
                <attribute name="as2_url" value="http://localhost:10080"/>
                <attribute name="as2_mdn_to" value="http://localhost:10080"/>
                <attribute name="as2_mdn_options" value="signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha1"/>
                <attribute name="encrypt" value="3des"/>
                <attribute name="sign" value="md5"/>
        </partnership>
        <partnership name="OpenAS2B-OpenAS2A">
                <sender name="OpenAS2B"/>
                <receiver name="OpenAS2A"/>
                <attribute name="protocol" value="as2"/>
                <attribute name="subject" value="From OpenAS2B to OpenAS2A"/>
                <attribute name="as2_url" value="http://localhost:10080"/>
                <attribute name="as2_mdn_to" value="http://localhost:10080"/>
                <attribute name="as2_mdn_options" value="signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha1"/>
                <attribute name="encrypt" value="3des"/>
                <attribute name="sign" value="sha1"/>
        </partnership>
        <partnership name="mycompanyAS2-mendelsontestAS2">
                <sender name="mycompanyAS2"/>
                <receiver name="mendelsontestAS2"/>
                <attribute name="protocol" value="as2"/>
                <attribute name="subject" value="TEST"/>
                <attribute name="as2_url" value="http://testas2.mendelson-e-c.com:8080/as2/HttpReceiver"/>
                <attribute name="as2_mdn_to" value="http://104.236.58.252:10080/HttpReceiver"/>
                <attribute name="as2_mdn_options" value="signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha-256"/>
                <attribute name="encrypt" value="3des"/>
                <attribute name="sign" value="sha-256"/>
        </partnership>
        <partnership name="mendelsontestAS2-mycompanyAS2">
                <sender name="mendelsontestAS2"/>
                <receiver name="mycompanyAS2"/>
        </partnership>
</partnerships>

On mendelson's server, here is the raw decrypted message:

Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-1; 
    boundary="----=_Part_1_1574931341.1439645028220"

------=_Part_1_1574931341.1439645028220
Content-Type: application/EDI-X12
Content-Transfer-Encoding: 8bit

this is a test
test

------=_Part_1_1574931341.1439645028220
Content-Type: application/pkcs7-signature; name=smime.p7s; smime-type=signed-data
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIAwggLQMIIC
OQIEQ479uzANBgkqhkiG9w0BAQUFADCBrjEmMCQGCSqGSIb3DQEJARYXcm9zZXR0YW5ldEBtZW5k
ZWxzb24uZGUxCzAJBgNVBAYTAkRFMQ8wDQYDVQQIEwZCZXJsaW4xDzANBgNVBAcTBkJlcmxpbjEi
MCAGA1UEChMZbWVuZGVsc29uLWUtY29tbWVyY2UgR21iSDEiMCAGA1UECxMZbWVuZGVsc29uLWUt
Y29tbWVyY2UgR21iSDENMAsGA1UEAxMEbWVuZDAeFw0wNTEyMDExMzQyMTlaFw0xOTA4MTAxMzQy
MTlaMIGuMSYwJAYJKoZIhvcNAQkBFhdyb3NldHRhbmV0QG1lbmRlbHNvbi5kZTELMAkGA1UEBhMC
REUxDzANBgNVBAgTBkJlcmxpbjEPMA0GA1UEBxMGQmVybGluMSIwIAYDVQQKExltZW5kZWxzb24t
ZS1jb21tZXJjZSBHbWJIMSIwIAYDVQQLExltZW5kZWxzb24tZS1jb21tZXJjZSBHbWJIMQ0wCwYD
VQQDEwRtZW5kMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+X1g6JvbdwJI6mQMNT41GcycH
UbwCFWKJ4qHDaHffz3n4h+uQJJoQvc8yLTCfnl109GB0yL2Y5YQtTohOS9IwyyMWBhh77WJtCN8r
dOfD2DW17877te+NlpugRvg6eOH6np9Vn3RZODVxxTyyJ8pI8VMnn13YeyMMw7VVaEO5hQIDAQAB
MA0GCSqGSIb3DQEBBQUAA4GBALwOIc/rWMAANdEh/GgO/DSkVMwxM5UBr3TkYbLU/5jg0Lwj3Y++
KhumYSrxnYewSLqK+JXA4Os9NJ+b3eZRZnnYQ9eKeUZgdE/QP9XE04y8WL6ZHLB4sDnmsgVaTU+p
0lFyH0Te9NyPBG0J88109CXKdXCTSN5gq0S1CfYn0staAAAxggHbMIIB1wIBATCBtzCBrjEmMCQG
CSqGSIb3DQEJARYXcm9zZXR0YW5ldEBtZW5kZWxzb24uZGUxCzAJBgNVBAYTAkRFMQ8wDQYDVQQI
EwZCZXJsaW4xDzANBgNVBAcTBkJlcmxpbjEiMCAGA1UEChMZbWVuZGVsc29uLWUtY29tbWVyY2Ug
R21iSDEiMCAGA1UECxMZbWVuZGVsc29uLWUtY29tbWVyY2UgR21iSDENMAsGA1UEAxMEbWVuZAIE
Q479uzAJBgUrDgMCGgUAoHswGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUx
DxcNMTUwODE1MTMyMzQ4WjAcBgkqhkiG9w0BCQ8xDzANMAsGCWCGSAFlAwQCATAjBgkqhkiG9w0B
CQQxFgQUUIadP7vyD5SHcsVkJ2J6IxzI474wDQYJKoZIhvcNAQEBBQAEgYBjjORBqWrwC5RDN53v
C43Ph87W7WWy6mnQzYDLdZG8pjLHz72TdBrT4G7c1EPyxNg5DOP+pUeYzJclPjSPPYxj6JAu0SYg
rLXPySrE2JRSk9MbRm5XSy5Z/qWO5/iTQjYBTrNvyC8UJwc0DZjOxDSW9hbbGCN4nhBoTM3T1rJr
eQAAAAAAAA==
------=_Part_1_1574931341.1439645028220--

Notice the line:

Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-1; 

So it looks like as2-server is sending sha-1 as the micalg in the original message.

I need to take care of a few things, but I will be back on this in about 2-3 hours. I will be checking things here when I can and can hopefully sneak in some tests based on your input. Thanks Philip!

I improved debug logging in as2-lib. Can you please post the updated logs. Thanks. I'll be out for dinner now. More tomorrow :)

Hi Philip,

I hope you had a nice evening. Here are the updated logs.

[2015-08-15T20:58:46,415] [AS2-SERVER] [DEBUG] [Timer-3] AS2Message was created -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:223)
[2015-08-15T20:58:46,417] [AS2-SERVER] [DEBUG] [Timer-3] Formatting 'application/EDI-X12' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:141)
[2015-08-15T20:58:46,418] [AS2-SERVER] [DEBUG] [Timer-3] Formatted value is now 'application/EDI-X12' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:174)
[2015-08-15T20:58:46,423] [AS2-SERVER] [DEBUG] [Timer-7] File operation CREATE_DIR_RECURSIVE succeeded on 'data/resend' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-15T20:58:46,432] [AS2-SERVER] [DEBUG] [Timer-3] Updating partnership for AS2 message null -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.updateMessage(AbstractDirectoryPollingModule.java:386)
[2015-08-15T20:58:46,441] [AS2-SERVER] [DEBUG] [Timer-3] Updating partnership [Partnership@0x1d4d46bf: name=mycompanyAS2-mendelsontestAS2; senderIDs=[StringMap@0x663fd693: attrs={name=mycompanyAS2, as2_id=mycompanyAS2, x509_alias=mycompanyAS2, email=mycompanyAS2}]; receiverIDs=[StringMap@0x72fc9bed: attrs={name=mendelsontestAS2, as2_id=mendelsontestAS2, x509_alias=mendelsontestAS2, email=mendelsontestAS2}]; attributes=[StringMap@0x75ccc78e: attrs={protocol=as2, subject=TEST, as2_url=http://testas2.mendelson-e-c.com:8080/as2/HttpReceiver, as2_mdn_to=http://104.236.58.252:10080/HttpReceiver, as2_mdn_options=signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha-256, encrypt=3des, sign=sha-256}]] -- com.helger.as2lib.partner.AbstractPartnershipFactory.updatePartnership(AbstractPartnershipFactory.java:319)
[2015-08-15T20:58:46,443] [AS2-SERVER] [DEBUG] [Timer-3] Formatting 'TEST' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:141)
[2015-08-15T20:58:46,443] [AS2-SERVER] [DEBUG] [Timer-3] Formatted value is now 'TEST' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:174)
[2015-08-15T20:58:46,450] [AS2-SERVER] [DEBUG] [Timer-3] Finished updating partnership for AS2 message -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.updateMessage(AbstractDirectoryPollingModule.java:392)
[2015-08-15T20:58:46,452] [AS2-SERVER] [DEBUG] [Timer-3] Formatting 'ph-OpenAS2-$date.ddMMyyyyHHmmssZ$-$rand.1234$@$msg.sender.as2_id$_$msg.receiver.as2_id$' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:141)
[2015-08-15T20:58:46,452] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: DateParameters with 'ddMMyyyyHHmmssZ' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T20:58:46,453] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: RandomParameters with '1234' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T20:58:46,455] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: MessageParameters with 'sender.as2_id' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T20:58:46,460] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: MessageParameters with 'receiver.as2_id' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T20:58:46,461] [AS2-SERVER] [DEBUG] [Timer-3] Formatted value is now 'ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:174)
[2015-08-15T20:58:46,461] [AS2-SERVER] [DEBUG] [Timer-3] Updated message ID to <ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2> -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.updateMessage(AbstractDirectoryPollingModule.java:397)
[2015-08-15T20:58:46,461] [AS2-SERVER] [INFO ] [Timer-3] file assigned to message /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt [<ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:228)
[2015-08-15T20:58:46,461] [AS2-SERVER] [DEBUG] [Timer-3] DefaultMessageProcessor.handle (send,[AS2Message@0x3db1069f: data=javax.mail.internet.MimeBodyPart@10e0a234; MDN=null; history=com.helger.as2lib.message.DataHistory@23bc4e92],null) -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:128)
[2015-08-15T20:58:46,462] [AS2-SERVER] [DEBUG] [Timer-3]   handling with module [[AS2SenderModule@0x46957865: attrs={classname=com.helger.as2lib.processor.sender.AS2SenderModule}]] -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:139)
[2015-08-15T20:58:46,462] [AS2-SERVER] [INFO ] [Timer-3] message submitted:  [<ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:133)
[2015-08-15T20:58:46,639] [AS2-SERVER] [DEBUG] [Timer-3] Signed data [<ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.secure(AS2SenderModule.java:432)
[2015-08-15T20:58:46,698] [AS2-SERVER] [DEBUG] [Timer-3] Encrypted data [<ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.secure(AS2SenderModule.java:450)
[2015-08-15T20:58:46,854] [AS2-SERVER] [INFO ] [Timer-3] connecting to http://testas2.mendelson-e-c.com:8080/as2/HttpReceiver [<ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:176)
[2015-08-15T20:58:47,232] [AS2-SERVER] [INFO ] [Timer-3] transferred 2742 bytes in 0.138 seconds at 19.414 KBps [<ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:188)
[2015-08-15T20:58:48,279] [AS2-SERVER] [DEBUG] [Timer-3] DefaultMessageProcessor.handle (storemdn,[AS2Message@0x3db1069f: data=javax.mail.internet.MimeBodyPart@10e0a234; MDN=[[AS2MessageMDN@0x63d192dd: attributes=[StringMap@0x1e3fe0a2: attrs={REPORTING_UA=mendelson AS2 Server, ORIGINAL_RECIPIENT=rfc822; mendelsontestAS2, FINAL_RECIPIENT=rfc822; mendelsontestAS2, ORIGINAL_MESSAGE_ID=<ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2>, DISPOSITION=automatic-action/MDN-sent-automatically; processed, MIC=LPcP3NNUk4zoskkndlHaVQNrGIM=, sha1}]; headers=javax.mail.internet.InternetHeaders@301d7e70; partnership=[Partnership@0x41a55bc6: name=mendelsontestAS2-mycompanyAS2; senderIDs=[StringMap@0x2e0d7e55: attrs={name=mendelsontestAS2, as2_id=mendelsontestAS2, x509_alias=mendelsontestAS2, email=mendelsontestAS2}]; receiverIDs=[StringMap@0x4fd6b1c6: attrs={name=mycompanyAS2, as2_id=mycompanyAS2, x509_alias=mycompanyAS2, email=mycompanyAS2}]; attributes=[StringMap@0x1463b8b2: attrs={}]]]; message=<ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2>; data=javax.mail.internet.MimeBodyPart@7ff3ba93; text=The AS2 message has been received.]; history=com.helger.as2lib.message.DataHistory@23bc4e92],null) -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:128)
[2015-08-15T20:58:48,280] [AS2-SERVER] [DEBUG] [Timer-3]   handling with module [[MDNFileModule@0x3a499cee: attrs={classname=com.helger.as2lib.processor.storage.MDNFileModule, filename=data/mdn/$date.yyyy$/$date.MM$/$mdn.msg.sender.as2_id$-$mdn.msg.receiver.as2_id$-$mdn.msg.headers.message-id$, protocol=as2, tempdir=data/temp}]] -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:139)
[2015-08-15T20:58:48,280] [AS2-SERVER] [DEBUG] [Timer-3] Formatting 'data/mdn/$date.yyyy$/$date.MM$/$mdn.msg.sender.as2_id$-$mdn.msg.receiver.as2_id$-$mdn.msg.headers.message-id$' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:141)
[2015-08-15T20:58:48,281] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: DateParameters with 'yyyy' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T20:58:48,281] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: DateParameters with 'MM' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T20:58:48,282] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: MessageMDNParameters with 'msg.sender.as2_id' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T20:58:48,286] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: MessageMDNParameters with 'msg.receiver.as2_id' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T20:58:48,290] [AS2-SERVER] [DEBUG] [Timer-3] Nested getParameter: MessageMDNParameters with 'msg.headers.message-id' -- com.helger.as2lib.params.CompositeParameters.getParameter(CompositeParameters.java:121)
[2015-08-15T20:58:48,290] [AS2-SERVER] [DEBUG] [Timer-3] Formatted value is now 'data/mdn/2015/08/mycompanyAS2-mendelsontestAS2-<ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2>' -- com.helger.as2lib.params.AbstractParameterParser.format(AbstractParameterParser.java:174)
[2015-08-15T20:58:48,291] [AS2-SERVER] [DEBUG] [Timer-3] File operation CREATE_DIR_RECURSIVE succeeded on 'data/mdn/2015/08' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-15T20:58:48,298] [AS2-SERVER] [DEBUG] [Timer-3] File operation CREATE_DIR_RECURSIVE succeeded on 'data/temp' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-15T20:58:48,300] [AS2-SERVER] [DEBUG] [Timer-3] File operation RENAME_FILE succeeded on 'data/temp/mycompanyAS2-mendelsontestAS2-_ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2_' and 'data/mdn/2015/08/mycompanyAS2-mendelsontestAS2-_ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2_' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-15T20:58:48,301] [AS2-SERVER] [INFO ] [Timer-3] stored MDN to /home/mreinigjr/as2-server/data/mdn/2015/08/mycompanyAS2-mendelsontestAS2-_ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2_ -- com.helger.as2lib.processor.storage.MDNFileModule.handle(MDNFileModule.java:84)
[2015-08-15T20:58:48,301] [AS2-SERVER] [INFO ] [Timer-3] received MDN [automatic-action/MDN-sent-automatically; processed] [<ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.receiveMDN(AS2SenderModule.java:334)
[2015-08-15T20:58:48,306] [AS2-SERVER] [INFO ] [Timer-3] mic is not matched, original mic: ymUncV9GIsphxl5iM0DJlz4rjHzOVq38dS95FU/unS8=, sha-256 return mic: LPcP3NNUk4zoskkndlHaVQNrGIM=, sha1 [<ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.receiveMDN(AS2SenderModule.java:347)
[2015-08-15T20:58:48,307] [AS2-SERVER] [INFO ] [Timer-3] message sent [<ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:214)
[2015-08-15T20:58:48,314] [AS2-SERVER] [DEBUG] [Timer-3] AS2Message was successfully handled my the MessageProcessor -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:237)
[2015-08-15T20:58:48,318] [AS2-SERVER] [DEBUG] [Timer-3] Trying to delete file /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:290)
[2015-08-15T20:58:48,319] [AS2-SERVER] [INFO ] [Timer-3] deleted /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt [<ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:297)
[2015-08-15T20:58:51,402] [AS2-SERVER] [DEBUG] [Timer-1] File operation CREATE_DIR_RECURSIVE succeeded on 'data/toAny' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)

Honestly, I am not seeing anything that stands out to me other than maybe this:

[2015-08-15T20:58:48,279] [AS2-SERVER] [DEBUG] [Timer-3] DefaultMessageProcessor.handle (storemdn,[AS2Message@0x3db1069f: data=javax.mail.internet.MimeBodyPart@10e0a234; MDN=[[AS2MessageMDN@0x63d192dd: attributes=[StringMap@0x1e3fe0a2: attrs={REPORTING_UA=mendelson AS2 Server, ORIGINAL_RECIPIENT=rfc822; mendelsontestAS2, FINAL_RECIPIENT=rfc822; mendelsontestAS2, ORIGINAL_MESSAGE_ID=<ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2>, DISPOSITION=automatic-action/MDN-sent-automatically; processed, MIC=LPcP3NNUk4zoskkndlHaVQNrGIM=, sha1}]; headers=javax.mail.internet.InternetHeaders@301d7e70; partnership=[Partnership@0x41a55bc6: name=mendelsontestAS2-mycompanyAS2; senderIDs=[StringMap@0x2e0d7e55: attrs={name=mendelsontestAS2, as2_id=mendelsontestAS2, x509_alias=mendelsontestAS2, email=mendelsontestAS2}]; receiverIDs=[StringMap@0x4fd6b1c6: attrs={name=mycompanyAS2, as2_id=mycompanyAS2, x509_alias=mycompanyAS2, email=mycompanyAS2}]; attributes=[StringMap@0x1463b8b2: attrs={}]]]; message=<ph-OpenAS2-15082015205846-0400-1003@mycompanyAS2_mendelsontestAS2>; data=javax.mail.internet.MimeBodyPart@7ff3ba93; text=The AS2 message has been received.]; history=com.helger.as2lib.message.DataHistory@23bc4e92],null) -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:128)

The MIC LPcP3NNUk4zoskkndlHaVQNrGIM=, sha1 is actually sha-256.

Seems like you are not using the latest version. I noticed because I changed the "Nested getParameter..." messages to trace level... Can you please check whether you are on 2.0.2-SNAPSHOT for both. thanks

Hi Philip,

I hope you had a nice weekend. Sorry I have not been as available lately. However, this is my priority this week and I will be as available as possible so that we can figure out this issue.

Sorry about the incorrect logs. I deleted my .m2/repository folder and now they seem to look different. Here are the logs:

[2015-08-16T22:19:47,762] [AS2-SERVER] [INFO ] [Timer-3] processing /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:210)
[2015-08-16T22:19:47,775] [AS2-SERVER] [DEBUG] [Timer-3] AS2Message was created -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:223)
[2015-08-16T22:19:47,803] [AS2-SERVER] [DEBUG] [Timer-3] Updating partnership for AS2 message null -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.updateMessage(AbstractDirectoryPollingModule.java:386)
[2015-08-16T22:19:47,814] [AS2-SERVER] [DEBUG] [Timer-3] Updating partnership [Partnership@0x3e0ee8e2: name=mycompanyAS2-mendelsontestAS2; senderIDs=[StringMap@0x223f5b40: attrs={name=mycompanyAS2, as2_id=mycompanyAS2, x509_alias=mycompanyAS2, email=mycompanyAS2}]; receiverIDs=[StringMap@0x602a1af3: attrs={name=mendelsontestAS2, as2_id=mendelsontestAS2, x509_alias=mendelsontestAS2, email=mendelsontestAS2}]; attributes=[StringMap@0x15cb0ff0: attrs={protocol=as2, subject=TEST, as2_url=http://testas2.mendelson-e-c.com:8080/as2/HttpReceiver, as2_mdn_to=http://104.236.58.252:10080/HttpReceiver, as2_mdn_options=signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha-256, encrypt=3des, sign=sha-256}]] -- com.helger.as2lib.partner.AbstractPartnershipFactory.updatePartnership(AbstractPartnershipFactory.java:319)
[2015-08-16T22:19:47,816] [AS2-SERVER] [DEBUG] [Timer-3] Finished updating partnership for AS2 message -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.updateMessage(AbstractDirectoryPollingModule.java:392)
[2015-08-16T22:19:47,828] [AS2-SERVER] [DEBUG] [Timer-3] Updated message ID to <ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2> -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.updateMessage(AbstractDirectoryPollingModule.java:397)
[2015-08-16T22:19:47,834] [AS2-SERVER] [INFO ] [Timer-3] file assigned to message /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt [<ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:228)
[2015-08-16T22:19:47,835] [AS2-SERVER] [DEBUG] [Timer-3] DefaultMessageProcessor.handle (send,[AS2Message@0x23037ae0: data=javax.mail.internet.MimeBodyPart@487419bd; MDN=null; history=com.helger.as2lib.message.DataHistory@627827bb],null) -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:128)
[2015-08-16T22:19:47,835] [AS2-SERVER] [DEBUG] [Timer-3]   handling with module [[AS2SenderModule@0x1d9be8ff: attrs={classname=com.helger.as2lib.processor.sender.AS2SenderModule}]] -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:139)
[2015-08-16T22:19:47,836] [AS2-SERVER] [INFO ] [Timer-3] message submitted:  [<ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:133)
[2015-08-16T22:19:48,107] [AS2-SERVER] [DEBUG] [Timer-3] Signed data with DIGEST_SHA256: [<ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.secure(AS2SenderModule.java:439)
[2015-08-16T22:19:48,217] [AS2-SERVER] [DEBUG] [Timer-3] Encrypted data with CRYPT_3DES: [<ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.secure(AS2SenderModule.java:457)
[2015-08-16T22:19:48,242] [AS2-SERVER] [DEBUG] [Timer-3] DispositionOptions=[DispositionOptions@0x0ec6d679: ProtocolImportance=optional; Protocol=pkcs7-signature; MICAlgImportance=optional; MICAlgs=[DIGEST_SHA256]] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:161)
[2015-08-16T22:19:48,503] [AS2-SERVER] [DEBUG] [Timer-3] Calculated MIC: 'ymUncV9GIsphxl5iM0DJlz4rjHzOVq38dS95FU/unS8=, sha-256' -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:180)
[2015-08-16T22:19:48,508] [AS2-SERVER] [INFO ] [Timer-3] connecting to http://testas2.mendelson-e-c.com:8080/as2/HttpReceiver [<ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:182)
[2015-08-16T22:19:48,988] [AS2-SERVER] [INFO ] [Timer-3] transferred 2742 bytes in 0.208 seconds at 12.895 KBps [<ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:194)
[2015-08-16T22:19:49,782] [AS2-SERVER] [DEBUG] [Timer-3] DefaultMessageProcessor.handle (storemdn,[AS2Message@0x23037ae0: data=javax.mail.internet.MimeBodyPart@487419bd; MDN=[[AS2MessageMDN@0x08dcefa6: attributes=[StringMap@0x7bea33bb: attrs={REPORTING_UA=mendelson AS2 Server, ORIGINAL_RECIPIENT=rfc822; mendelsontestAS2, FINAL_RECIPIENT=rfc822; mendelsontestAS2, ORIGINAL_MESSAGE_ID=<ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2>, DISPOSITION=automatic-action/MDN-sent-automatically; processed, MIC=LPcP3NNUk4zoskkndlHaVQNrGIM=, sha1}]; headers=javax.mail.internet.InternetHeaders@ff06d76; partnership=[Partnership@0x143d42ec: name=mendelsontestAS2-mycompanyAS2; senderIDs=[StringMap@0x7bf33e12: attrs={name=mendelsontestAS2, as2_id=mendelsontestAS2, x509_alias=mendelsontestAS2, email=mendelsontestAS2}]; receiverIDs=[StringMap@0x51aead3c: attrs={name=mycompanyAS2, as2_id=mycompanyAS2, x509_alias=mycompanyAS2, email=mycompanyAS2}]; attributes=[StringMap@0x5d39e1a2: attrs={}]]]; message=<ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2>; data=javax.mail.internet.MimeBodyPart@23ede2cb; text=The AS2 message has been received.]; history=com.helger.as2lib.message.DataHistory@627827bb],null) -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:128)
[2015-08-16T22:19:49,783] [AS2-SERVER] [DEBUG] [Timer-3]   handling with module [[MDNFileModule@0x410c5b0a: attrs={classname=com.helger.as2lib.processor.storage.MDNFileModule, filename=data/mdn/$date.yyyy$/$date.MM$/$mdn.msg.sender.as2_id$-$mdn.msg.receiver.as2_id$-$mdn.msg.headers.message-id$, protocol=as2, tempdir=data/temp}]] -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:139)
[2015-08-16T22:19:49,786] [AS2-SERVER] [DEBUG] [Timer-3] File operation CREATE_DIR_RECURSIVE succeeded on 'data/mdn/2015/08' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-16T22:19:49,790] [AS2-SERVER] [DEBUG] [Timer-3] File operation CREATE_DIR_RECURSIVE succeeded on 'data/temp' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-16T22:19:49,794] [AS2-SERVER] [DEBUG] [Timer-3] File operation RENAME_FILE succeeded on 'data/temp/mycompanyAS2-mendelsontestAS2-_ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2_' and 'data/mdn/2015/08/mycompanyAS2-mendelsontestAS2-_ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2_' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-16T22:19:49,798] [AS2-SERVER] [INFO ] [Timer-3] stored MDN to /home/mreinigjr/as2-server/data/mdn/2015/08/mycompanyAS2-mendelsontestAS2-_ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2_ -- com.helger.as2lib.processor.storage.MDNFileModule.handle(MDNFileModule.java:84)
[2015-08-16T22:19:49,799] [AS2-SERVER] [INFO ] [Timer-3] received MDN [automatic-action/MDN-sent-automatically; processed] [<ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.receiveMDN(AS2SenderModule.java:340)
[2015-08-16T22:19:49,799] [AS2-SERVER] [INFO ] [Timer-3] mic is not matched, original mic: 'ymUncV9GIsphxl5iM0DJlz4rjHzOVq38dS95FU/unS8=, sha-256' return mic: 'LPcP3NNUk4zoskkndlHaVQNrGIM=, sha1' [<ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.receiveMDN(AS2SenderModule.java:353)
[2015-08-16T22:19:49,804] [AS2-SERVER] [INFO ] [Timer-3] message sent [<ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:220)
[2015-08-16T22:19:49,805] [AS2-SERVER] [DEBUG] [Timer-3] AS2Message was successfully handled my the MessageProcessor -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:237)
[2015-08-16T22:19:49,806] [AS2-SERVER] [DEBUG] [Timer-3] Trying to delete file /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:290)
[2015-08-16T22:19:49,806] [AS2-SERVER] [INFO ] [Timer-3] deleted /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt [<ph-OpenAS2-16082015221947-0400-2729@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:297)
[2015-08-16T22:19:52,754] [AS2-SERVER] [DEBUG] [Timer-2] File operation CREATE_DIR_RECURSIVE succeeded on 'data/topartner' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)

Thanks,
Michael

Just in case you might be interested in if I tried using md5. Here is the log...same deal:

[2015-08-16T22:29:42,397] [AS2-SERVER] [INFO ] [Timer-3] processing /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:210)
[2015-08-16T22:29:42,402] [AS2-SERVER] [DEBUG] [Timer-6] File operation CREATE_DIR_RECURSIVE succeeded on 'data/toOpenAS2B' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-16T22:29:42,402] [AS2-SERVER] [DEBUG] [Timer-5] File operation CREATE_DIR_RECURSIVE succeeded on 'data/toOpenAS2A' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-16T22:29:42,405] [AS2-SERVER] [DEBUG] [Timer-3] AS2Message was created -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:223)
[2015-08-16T22:29:42,414] [AS2-SERVER] [DEBUG] [Timer-3] Updating partnership for AS2 message null -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.updateMessage(AbstractDirectoryPollingModule.java:386)
[2015-08-16T22:29:42,416] [AS2-SERVER] [DEBUG] [Timer-3] Updating partnership [Partnership@0x1b959b4a: name=mycompanyAS2-mendelsontestAS2; senderIDs=[StringMap@0x5cd693d3: attrs={name=mycompanyAS2, as2_id=mycompanyAS2, x509_alias=mycompanyAS2, email=mycompanyAS2}]; receiverIDs=[StringMap@0x7a6fdea1: attrs={name=mendelsontestAS2, as2_id=mendelsontestAS2, x509_alias=mendelsontestAS2, email=mendelsontestAS2}]; attributes=[StringMap@0x6c23d4f8: attrs={protocol=as2, subject=TEST, as2_url=http://testas2.mendelson-e-c.com:8080/as2/HttpReceiver, as2_mdn_to=http://104.236.58.252:10080/HttpReceiver, as2_mdn_options=signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, md5, encrypt=3des, sign=md5}]] -- com.helger.as2lib.partner.AbstractPartnershipFactory.updatePartnership(AbstractPartnershipFactory.java:319)
[2015-08-16T22:29:42,416] [AS2-SERVER] [DEBUG] [Timer-3] Finished updating partnership for AS2 message -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.updateMessage(AbstractDirectoryPollingModule.java:392)
[2015-08-16T22:29:42,420] [AS2-SERVER] [DEBUG] [Timer-3] Updated message ID to <ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2> -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.updateMessage(AbstractDirectoryPollingModule.java:397)
[2015-08-16T22:29:42,420] [AS2-SERVER] [INFO ] [Timer-3] file assigned to message /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt [<ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:228)
[2015-08-16T22:29:42,421] [AS2-SERVER] [DEBUG] [Timer-3] DefaultMessageProcessor.handle (send,[AS2Message@0x329e0959: data=javax.mail.internet.MimeBodyPart@691caf35; MDN=null; history=com.helger.as2lib.message.DataHistory@1f49218a],null) -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:128)
[2015-08-16T22:29:42,421] [AS2-SERVER] [DEBUG] [Timer-3]   handling with module [[AS2SenderModule@0x577dba84: attrs={classname=com.helger.as2lib.processor.sender.AS2SenderModule}]] -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:139)
[2015-08-16T22:29:42,421] [AS2-SERVER] [INFO ] [Timer-3] message submitted:  [<ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:133)
[2015-08-16T22:29:42,718] [AS2-SERVER] [DEBUG] [Timer-3] Signed data with DIGEST_MD5: [<ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.secure(AS2SenderModule.java:439)
[2015-08-16T22:29:42,843] [AS2-SERVER] [DEBUG] [Timer-3] Encrypted data with CRYPT_3DES: [<ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.secure(AS2SenderModule.java:457)
[2015-08-16T22:29:42,867] [AS2-SERVER] [DEBUG] [Timer-3] DispositionOptions=[DispositionOptions@0x75a2080e: ProtocolImportance=optional; Protocol=pkcs7-signature; MICAlgImportance=optional; MICAlgs=[DIGEST_MD5]] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:161)
[2015-08-16T22:29:43,113] [AS2-SERVER] [DEBUG] [Timer-3] Calculated MIC: '/6WszGAh+JHXaJvT759DbQ==, md5' -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:180)
[2015-08-16T22:29:43,114] [AS2-SERVER] [INFO ] [Timer-3] connecting to http://testas2.mendelson-e-c.com:8080/as2/HttpReceiver [<ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:182)
[2015-08-16T22:29:43,527] [AS2-SERVER] [INFO ] [Timer-3] transferred 2734 bytes in 0.151 seconds at 17.698 KBps [<ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:194)
[2015-08-16T22:29:44,295] [AS2-SERVER] [DEBUG] [Timer-3] DefaultMessageProcessor.handle (storemdn,[AS2Message@0x329e0959: data=javax.mail.internet.MimeBodyPart@691caf35; MDN=[[AS2MessageMDN@0x2a05b58a: attributes=[StringMap@0x22087c65: attrs={REPORTING_UA=mendelson AS2 Server, ORIGINAL_RECIPIENT=rfc822; mendelsontestAS2, FINAL_RECIPIENT=rfc822; mendelsontestAS2, ORIGINAL_MESSAGE_ID=<ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2>, DISPOSITION=automatic-action/MDN-sent-automatically; processed, MIC=LPcP3NNUk4zoskkndlHaVQNrGIM=, sha1}]; headers=javax.mail.internet.InternetHeaders@4352e118; partnership=[Partnership@0x5f05d2fc: name=mendelsontestAS2-mycompanyAS2; senderIDs=[StringMap@0x58ab8573: attrs={name=mendelsontestAS2, as2_id=mendelsontestAS2, x509_alias=mendelsontestAS2, email=mendelsontestAS2}]; receiverIDs=[StringMap@0x39212157: attrs={name=mycompanyAS2, as2_id=mycompanyAS2, x509_alias=mycompanyAS2, email=mycompanyAS2}]; attributes=[StringMap@0x6daf4d4a: attrs={}]]]; message=<ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2>; data=javax.mail.internet.MimeBodyPart@1ccce031; text=The AS2 message has been received.]; history=com.helger.as2lib.message.DataHistory@1f49218a],null) -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:128)
[2015-08-16T22:29:44,297] [AS2-SERVER] [DEBUG] [Timer-3]   handling with module [[MDNFileModule@0x18c86ec6: attrs={classname=com.helger.as2lib.processor.storage.MDNFileModule, filename=data/mdn/$date.yyyy$/$date.MM$/$mdn.msg.sender.as2_id$-$mdn.msg.receiver.as2_id$-$mdn.msg.headers.message-id$, protocol=as2, tempdir=data/temp}]] -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:139)
[2015-08-16T22:29:44,300] [AS2-SERVER] [DEBUG] [Timer-3] File operation CREATE_DIR_RECURSIVE succeeded on 'data/mdn/2015/08' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-16T22:29:44,309] [AS2-SERVER] [DEBUG] [Timer-3] File operation CREATE_DIR_RECURSIVE succeeded on 'data/temp' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-16T22:29:44,311] [AS2-SERVER] [DEBUG] [Timer-3] File operation RENAME_FILE succeeded on 'data/temp/mycompanyAS2-mendelsontestAS2-_ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2_' and 'data/mdn/2015/08/mycompanyAS2-mendelsontestAS2-_ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2_' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-16T22:29:44,314] [AS2-SERVER] [INFO ] [Timer-3] stored MDN to /home/mreinigjr/as2-server/data/mdn/2015/08/mycompanyAS2-mendelsontestAS2-_ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2_ -- com.helger.as2lib.processor.storage.MDNFileModule.handle(MDNFileModule.java:84)
[2015-08-16T22:29:44,315] [AS2-SERVER] [INFO ] [Timer-3] received MDN [automatic-action/MDN-sent-automatically; processed] [<ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.receiveMDN(AS2SenderModule.java:340)
[2015-08-16T22:29:44,316] [AS2-SERVER] [INFO ] [Timer-3] mic is not matched, original mic: '/6WszGAh+JHXaJvT759DbQ==, md5' return mic: 'LPcP3NNUk4zoskkndlHaVQNrGIM=, sha1' [<ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.receiveMDN(AS2SenderModule.java:353)
[2015-08-16T22:29:44,317] [AS2-SERVER] [INFO ] [Timer-3] message sent [<ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:220)
[2015-08-16T22:29:44,318] [AS2-SERVER] [DEBUG] [Timer-3] AS2Message was successfully handled my the MessageProcessor -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:237)
[2015-08-16T22:29:44,318] [AS2-SERVER] [DEBUG] [Timer-3] Trying to delete file /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:290)
[2015-08-16T22:29:44,319] [AS2-SERVER] [INFO ] [Timer-3] deleted /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt [<ph-OpenAS2-16082015222942-0400-5409@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:297)
[2015-08-16T22:29:47,385] [AS2-SERVER] [DEBUG] [Timer-1] File operation CREATE_DIR_RECURSIVE succeeded on 'data/toAny' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)

Thanks,
Michael

Hi Michael!

I checked the Mendelson logs and it least it seems they are trying to send back the SHA-256 MIC.
I think it would be valuable to ask the Mendelson support team how their test server is going to react if different hash algorithms are used....

Concerning the as2-lib update, you should only need to do the following things (and not remove the whole maven repo):

  • cd as2-lib
  • mvn clean install
  • cd ../as2-server
  • mvn clean package

Note: the difference between "install" and "package" is, that install also puts a copy in the local Maven repo (the one you deleted), whereas "package" only builds the local pakage in the "target" folder.

// Philip

Hi Philip,

I have a message out to Medelson, but I still have not heard anything from them. Once I do, I will let you know ASAP.

Thanks for the update instructions. I must have skipped a step unknowingly last time.

Michael

Where would this heading in the original sent message be formed?

Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1;  boundary="----=_Part_1_25568201.1439826000284"

Thanks,
Michael

This header is usually formed in AS2SenderModule.secure.
I added some more debug logging on message header and attribute changes. Maybe this helps.

// Philip

new logs:

[2015-08-17T15:47:46,436] [AS2-SERVER] [INFO ] [Timer-3] processing /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:215)
[2015-08-17T15:47:46,439] [AS2-SERVER] [DEBUG] [Timer-6] File operation CREATE_DIR_RECURSIVE succeeded on 'data/toOpenAS2B' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-17T15:47:46,439] [AS2-SERVER] [DEBUG] [Timer-5] File operation CREATE_DIR_RECURSIVE succeeded on 'data/toOpenAS2A' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-17T15:47:46,450] [AS2-SERVER] [DEBUG] [Timer-3] Setting message attribute: 'filepath' = '/home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt' -- com.helger.as2lib.message.AbstractBaseMessage.setAttribute(AbstractBaseMessage.java:118)
[2015-08-17T15:47:46,450] [AS2-SERVER] [DEBUG] [Timer-3] Setting message attribute: 'filename' = 'test.txt' -- com.helger.as2lib.message.AbstractBaseMessage.setAttribute(AbstractBaseMessage.java:118)
[2015-08-17T15:47:46,450] [AS2-SERVER] [DEBUG] [Timer-3] Setting message attribute: 'pendingfilename' = 'test.txt' -- com.helger.as2lib.message.AbstractBaseMessage.setAttribute(AbstractBaseMessage.java:118)
[2015-08-17T15:47:46,451] [AS2-SERVER] [DEBUG] [Timer-3] AS2Message was created -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:228)
[2015-08-17T15:47:46,471] [AS2-SERVER] [DEBUG] [Timer-3] Setting message header: 'Content-Type' = 'application/EDI-X12' -- com.helger.as2lib.message.AbstractBaseMessage.setHeader(AbstractBaseMessage.java:145)
[2015-08-17T15:47:46,471] [AS2-SERVER] [DEBUG] [Timer-3] Setting message header: 'Content-Disposition' = 'null' -- com.helger.as2lib.message.AbstractBaseMessage.setHeader(AbstractBaseMessage.java:145)
[2015-08-17T15:47:46,472] [AS2-SERVER] [DEBUG] [Timer-3] Updating partnership for AS2 message null -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.updateMessage(AbstractDirectoryPollingModule.java:391)
[2015-08-17T15:47:46,474] [AS2-SERVER] [DEBUG] [Timer-3] Updating partnership [Partnership@0x29d6ecba: name=mycompanyAS2-mendelsontestAS2; senderIDs=[StringMap@0x1c202df2: attrs={name=mycompanyAS2, as2_id=mycompanyAS2, x509_alias=mycompanyAS2, email=mycompanyAS2}]; receiverIDs=[StringMap@0x47c1aace: attrs={name=mendelsontestAS2, as2_id=mendelsontestAS2, x509_alias=mendelsontestAS2, email=mendelsontestAS2}]; attributes=[StringMap@0x14615953: attrs={protocol=as2, subject=TEST, as2_url=http://testas2.mendelson-e-c.com:8080/as2/HttpReceiver, as2_mdn_to=http://104.236.58.252:10080/HttpReceiver, as2_mdn_options=signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, md5, encrypt=3des, sign=md5}]] -- com.helger.as2lib.partner.AbstractPartnershipFactory.updatePartnership(AbstractPartnershipFactory.java:319)
[2015-08-17T15:47:46,475] [AS2-SERVER] [DEBUG] [Timer-3] Setting message header: 'Subject' = 'TEST' -- com.helger.as2lib.message.AbstractBaseMessage.setHeader(AbstractBaseMessage.java:145)
[2015-08-17T15:47:46,476] [AS2-SERVER] [DEBUG] [Timer-3] Finished updating partnership for AS2 message -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.updateMessage(AbstractDirectoryPollingModule.java:397)
[2015-08-17T15:47:46,480] [AS2-SERVER] [DEBUG] [Timer-3] Setting message header: 'Message-ID' = '<ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2>' -- com.helger.as2lib.message.AbstractBaseMessage.setHeader(AbstractBaseMessage.java:145)
[2015-08-17T15:47:46,480] [AS2-SERVER] [DEBUG] [Timer-3] Updated message ID to <ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2> -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.updateMessage(AbstractDirectoryPollingModule.java:402)
[2015-08-17T15:47:46,480] [AS2-SERVER] [INFO ] [Timer-3] file assigned to message /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt [<ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:233)
[2015-08-17T15:47:46,481] [AS2-SERVER] [DEBUG] [Timer-3] DefaultMessageProcessor.handle (send,[AS2Message@0x0f76aaf1: data=javax.mail.internet.MimeBodyPart@7c3f0814; MDN=null; history=com.helger.as2lib.message.DataHistory@74de4501],null) -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:128)
[2015-08-17T15:47:46,481] [AS2-SERVER] [DEBUG] [Timer-3]   handling with module [[AS2SenderModule@0x0d7fb668: attrs={classname=com.helger.as2lib.processor.sender.AS2SenderModule}]] -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:139)
[2015-08-17T15:47:46,481] [AS2-SERVER] [INFO ] [Timer-3] message submitted:  [<ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:133)
[2015-08-17T15:47:46,627] [AS2-SERVER] [DEBUG] [Timer-3] Signed data with DIGEST_MD5: [<ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.secure(AS2SenderModule.java:443)
[2015-08-17T15:47:46,737] [AS2-SERVER] [DEBUG] [Timer-3] Encrypted data with CRYPT_3DES: [<ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.secure(AS2SenderModule.java:461)
[2015-08-17T15:47:46,738] [AS2-SERVER] [DEBUG] [Timer-3] Setting message content type to 'application/pkcs7-mime; name="smime.p7m"; smime-type=enveloped-data' -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:146)
[2015-08-17T15:47:46,742] [AS2-SERVER] [DEBUG] [Timer-3] Setting message header: 'Content-Type' = 'application/pkcs7-mime; name="smime.p7m"; smime-type=enveloped-data' -- com.helger.as2lib.message.AbstractBaseMessage.setHeader(AbstractBaseMessage.java:145)
[2015-08-17T15:47:46,763] [AS2-SERVER] [DEBUG] [Timer-3] Setting message attribute: 'destination_ip' = 'testas2.mendelson-e-c.com' -- com.helger.as2lib.message.AbstractBaseMessage.setAttribute(AbstractBaseMessage.java:118)
[2015-08-17T15:47:46,763] [AS2-SERVER] [DEBUG] [Timer-3] Setting message attribute: 'destination_port' = '8080' -- com.helger.as2lib.message.AbstractBaseMessage.setAttribute(AbstractBaseMessage.java:118)
[2015-08-17T15:47:46,766] [AS2-SERVER] [DEBUG] [Timer-3] DispositionOptions=[DispositionOptions@0x39249979: ProtocolImportance=optional; Protocol=pkcs7-signature; MICAlgImportance=optional; MICAlgs=[DIGEST_MD5]] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:165)
[2015-08-17T15:47:47,014] [AS2-SERVER] [DEBUG] [Timer-3] Calculated MIC: '/6WszGAh+JHXaJvT759DbQ==, md5' -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:184)
[2015-08-17T15:47:47,015] [AS2-SERVER] [INFO ] [Timer-3] connecting to http://testas2.mendelson-e-c.com:8080/as2/HttpReceiver [<ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:186)
[2015-08-17T15:47:47,538] [AS2-SERVER] [INFO ] [Timer-3] transferred 2742 bytes in 0.154 seconds at 17.397 KBps [<ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:198)
[2015-08-17T15:47:48,118] [AS2-SERVER] [DEBUG] [Timer-3] Setting message header: 'AS2-To' = 'null' -- com.helger.as2lib.message.AbstractBaseMessage.setHeader(AbstractBaseMessage.java:145)
[2015-08-17T15:47:48,119] [AS2-SERVER] [DEBUG] [Timer-3] Setting message header: 'AS2-From' = 'null' -- com.helger.as2lib.message.AbstractBaseMessage.setHeader(AbstractBaseMessage.java:145)
[2015-08-17T15:47:48,231] [AS2-SERVER] [DEBUG] [Timer-3] Setting message attribute: 'REPORTING_UA' = 'mendelson AS2 Server' -- com.helger.as2lib.message.AbstractBaseMessage.setAttribute(AbstractBaseMessage.java:118)
[2015-08-17T15:47:48,232] [AS2-SERVER] [DEBUG] [Timer-3] Setting message attribute: 'ORIGINAL_RECIPIENT' = 'rfc822; mendelsontestAS2' -- com.helger.as2lib.message.AbstractBaseMessage.setAttribute(AbstractBaseMessage.java:118)
[2015-08-17T15:47:48,233] [AS2-SERVER] [DEBUG] [Timer-3] Setting message attribute: 'FINAL_RECIPIENT' = 'rfc822; mendelsontestAS2' -- com.helger.as2lib.message.AbstractBaseMessage.setAttribute(AbstractBaseMessage.java:118)
[2015-08-17T15:47:48,233] [AS2-SERVER] [DEBUG] [Timer-3] Setting message attribute: 'ORIGINAL_MESSAGE_ID' = '<ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2>' -- com.helger.as2lib.message.AbstractBaseMessage.setAttribute(AbstractBaseMessage.java:118)
[2015-08-17T15:47:48,233] [AS2-SERVER] [DEBUG] [Timer-3] Setting message attribute: 'DISPOSITION' = 'automatic-action/MDN-sent-automatically; processed' -- com.helger.as2lib.message.AbstractBaseMessage.setAttribute(AbstractBaseMessage.java:118)
[2015-08-17T15:47:48,236] [AS2-SERVER] [DEBUG] [Timer-3] Setting message attribute: 'MIC' = 'LPcP3NNUk4zoskkndlHaVQNrGIM=, sha1' -- com.helger.as2lib.message.AbstractBaseMessage.setAttribute(AbstractBaseMessage.java:118)
[2015-08-17T15:47:48,239] [AS2-SERVER] [DEBUG] [Timer-3] DefaultMessageProcessor.handle (storemdn,[AS2Message@0x0f76aaf1: data=javax.mail.internet.MimeBodyPart@7c3f0814; MDN=[[AS2MessageMDN@0x09bb8c59: attributes=[StringMap@0x147eb4e4: attrs={REPORTING_UA=mendelson AS2 Server, ORIGINAL_RECIPIENT=rfc822; mendelsontestAS2, FINAL_RECIPIENT=rfc822; mendelsontestAS2, ORIGINAL_MESSAGE_ID=<ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2>, DISPOSITION=automatic-action/MDN-sent-automatically; processed, MIC=LPcP3NNUk4zoskkndlHaVQNrGIM=, sha1}]; headers=javax.mail.internet.InternetHeaders@162c5c52; partnership=[Partnership@0x2b8d7e2f: name=mendelsontestAS2-mycompanyAS2; senderIDs=[StringMap@0x7e01f643: attrs={name=mendelsontestAS2, as2_id=mendelsontestAS2, x509_alias=mendelsontestAS2, email=mendelsontestAS2}]; receiverIDs=[StringMap@0x1fb9a4f3: attrs={name=mycompanyAS2, as2_id=mycompanyAS2, x509_alias=mycompanyAS2, email=mycompanyAS2}]; attributes=[StringMap@0x6b03b59a: attrs={}]]]; message=<ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2>; data=javax.mail.internet.MimeBodyPart@2bbfd2d3; text=The AS2 message has been received.]; history=com.helger.as2lib.message.DataHistory@74de4501],null) -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:128)
[2015-08-17T15:47:48,239] [AS2-SERVER] [DEBUG] [Timer-3]   handling with module [[MDNFileModule@0x5afd8a09: attrs={classname=com.helger.as2lib.processor.storage.MDNFileModule, filename=data/mdn/$date.yyyy$/$date.MM$/$mdn.msg.sender.as2_id$-$mdn.msg.receiver.as2_id$-$mdn.msg.headers.message-id$, protocol=as2, tempdir=data/temp}]] -- com.helger.as2lib.processor.DefaultMessageProcessor.handle(DefaultMessageProcessor.java:139)
[2015-08-17T15:47:48,241] [AS2-SERVER] [DEBUG] [Timer-3] File operation CREATE_DIR_RECURSIVE succeeded on 'data/mdn/2015/08' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-17T15:47:48,249] [AS2-SERVER] [DEBUG] [Timer-3] File operation CREATE_DIR_RECURSIVE succeeded on 'data/temp' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-17T15:47:48,252] [AS2-SERVER] [DEBUG] [Timer-3] File operation RENAME_FILE succeeded on 'data/temp/mycompanyAS2-mendelsontestAS2-_ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2_' and 'data/mdn/2015/08/mycompanyAS2-mendelsontestAS2-_ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2_' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)
[2015-08-17T15:47:48,253] [AS2-SERVER] [INFO ] [Timer-3] stored MDN to /home/mreinigjr/as2-server/data/mdn/2015/08/mycompanyAS2-mendelsontestAS2-_ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2_ -- com.helger.as2lib.processor.storage.MDNFileModule.handle(MDNFileModule.java:84)
[2015-08-17T15:47:48,254] [AS2-SERVER] [INFO ] [Timer-3] received MDN [automatic-action/MDN-sent-automatically; processed] [<ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.receiveMDN(AS2SenderModule.java:344)
[2015-08-17T15:47:48,256] [AS2-SERVER] [INFO ] [Timer-3] mic is not matched, original mic: '/6WszGAh+JHXaJvT759DbQ==, md5' return mic: 'LPcP3NNUk4zoskkndlHaVQNrGIM=, sha1' [<ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.receiveMDN(AS2SenderModule.java:357)
[2015-08-17T15:47:48,257] [AS2-SERVER] [INFO ] [Timer-3] message sent [<ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.handle(AS2SenderModule.java:224)
[2015-08-17T15:47:48,258] [AS2-SERVER] [DEBUG] [Timer-3] AS2Message was successfully handled my the MessageProcessor -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:242)
[2015-08-17T15:47:48,258] [AS2-SERVER] [DEBUG] [Timer-3] Trying to delete file /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:295)
[2015-08-17T15:47:48,259] [AS2-SERVER] [INFO ] [Timer-3] deleted /home/mreinigjr/as2-server/data/toMendelsontestAS2/test.txt [<ph-OpenAS2-17082015154746-0400-4970@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.receiver.AbstractDirectoryPollingModule.processFile(AbstractDirectoryPollingModule.java:302)
[2015-08-17T15:47:51,434] [AS2-SERVER] [DEBUG] [Timer-2] File operation CREATE_DIR_RECURSIVE succeeded on 'data/topartner' -- com.helger.commons.io.file.LoggingFileOperationCallback.onSuccess(LoggingFileOperationCallback.java:41)

Looks like it is never setting the micalg value. It leaves it blank, so I think it is defaulting to sha1? What do you think?

By the way, we can look at this tomorrow if you prefer. Sorry for it being so late.

You see, you are sending with 3DES + MD5 and your response is an MDN with sha1... Lets wait for Mendelson response - I guess my timezone ;-)

Hi Philip,

Correct on the timezone. :)

The MDN request in sha1 is correct, but the original message does not look like it is:

[2015-08-17T15:47:48,236] [AS2-SERVER] [DEBUG] [Timer-3] Setting message attribute: 'MIC' = 'LPcP3NNUk4zoskkndlHaVQNrGIM=, sha1' -- com.helger.as2lib.message.AbstractBaseMessage.setAttribute(AbstractBaseMessage.java:118)

I am only just beginning to dig into rfc 4130, but it looks like the original message needs to have the content-type set with a micalg value.

Please look at https://www.ietf.org/rfc/rfc4130.txt Appendix A.1 (page 41). Here it sets the Disposition-Notification-Options which is for the MDN as well as the Content-Type which is for the message itself. Like I said, this is my first pass through these documents, so I could be wrong but this makes sense to me.

Here is what our original message original looks like from Mendelson's perspective (below). From rfc 4130, the first content type is not part of the header, but rather part of the message. So it is in the right place, just micalg is being set a sha1 always.

Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-1; 
    boundary="----=_Part_1_1737873859.1439840866612"

------=_Part_1_1737873859.1439840866612
Content-Type: application/EDI-X12
Content-Transfer-Encoding: 8bit

this is a test
test

------=_Part_1_1737873859.1439840866612
Content-Type: application/pkcs7-signature; name=smime.p7s; smime-type=signed-data
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIAwggLQMIIC
OQIEQ479uzANBgkqhkiG9w0BAQUFADCBrjEmMCQGCSqGSIb3DQEJARYXcm9zZXR0YW5ldEBtZW5k
ZWxzb24uZGUxCzAJBgNVBAYTAkRFMQ8wDQYDVQQIEwZCZXJsaW4xDzANBgNVBAcTBkJlcmxpbjEi
MCAGA1UEChMZbWVuZGVsc29uLWUtY29tbWVyY2UgR21iSDEiMCAGA1UECxMZbWVuZGVsc29uLWUt
Y29tbWVyY2UgR21iSDENMAsGA1UEAxMEbWVuZDAeFw0wNTEyMDExMzQyMTlaFw0xOTA4MTAxMzQy
MTlaMIGuMSYwJAYJKoZIhvcNAQkBFhdyb3NldHRhbmV0QG1lbmRlbHNvbi5kZTELMAkGA1UEBhMC
REUxDzANBgNVBAgTBkJlcmxpbjEPMA0GA1UEBxMGQmVybGluMSIwIAYDVQQKExltZW5kZWxzb24t
ZS1jb21tZXJjZSBHbWJIMSIwIAYDVQQLExltZW5kZWxzb24tZS1jb21tZXJjZSBHbWJIMQ0wCwYD
VQQDEwRtZW5kMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+X1g6JvbdwJI6mQMNT41GcycH
UbwCFWKJ4qHDaHffz3n4h+uQJJoQvc8yLTCfnl109GB0yL2Y5YQtTohOS9IwyyMWBhh77WJtCN8r
dOfD2DW17877te+NlpugRvg6eOH6np9Vn3RZODVxxTyyJ8pI8VMnn13YeyMMw7VVaEO5hQIDAQAB
MA0GCSqGSIb3DQEBBQUAA4GBALwOIc/rWMAANdEh/GgO/DSkVMwxM5UBr3TkYbLU/5jg0Lwj3Y++
KhumYSrxnYewSLqK+JXA4Os9NJ+b3eZRZnnYQ9eKeUZgdE/QP9XE04y8WL6ZHLB4sDnmsgVaTU+p
0lFyH0Te9NyPBG0J88109CXKdXCTSN5gq0S1CfYn0staAAAxggHaMIIB1gIBATCBtzCBrjEmMCQG
CSqGSIb3DQEJARYXcm9zZXR0YW5ldEBtZW5kZWxzb24uZGUxCzAJBgNVBAYTAkRFMQ8wDQYDVQQI
EwZCZXJsaW4xDzANBgNVBAcTBkJlcmxpbjEiMCAGA1UEChMZbWVuZGVsc29uLWUtY29tbWVyY2Ug
R21iSDEiMCAGA1UECxMZbWVuZGVsc29uLWUtY29tbWVyY2UgR21iSDENMAsGA1UEAxMEbWVuZAIE
Q479uzAJBgUrDgMCGgUAoHowGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAbBgkqhkiG9w0BCQ8x
DjAMMAoGCCqGSIb3DQIFMBwGCSqGSIb3DQEJBTEPFw0xNTA4MTcxOTQ3NDdaMCMGCSqGSIb3DQEJ
BDEWBBRQhp0/u/IPlIdyxWQnYnojHMjjvjANBgkqhkiG9w0BAQEFAASBgI3AM4Vijekxh8cdfvlt
sc7cIvp2H77o1pMO5cxq2YtM4dsfhGNZIB9MbcMj1vvIAZRAoZCfaEOmz5Q8UhkKMy0+oetb9sHC
QhpItLjtfDbsS/k6rVGAXVYO0t5xv9XwFe2kkzeK5BrboXN6izPWpBo/5urHK5RPDk6cRZQLB/3b
AAAAAAAA
------=_Part_1_1737873859.1439840866612--

Hi Philip,

Original OpenAS2 developers just released version 1.2.0 today (8/17/2015). They incorporated compression. I tried their implementation and Mendelson is able to recognize and process my message in MD5 or SHA1, but the received MIC from Mendelson still results in MIC is not matched error. Before with your implementation I was at least able to accomplish SHA1 full test with Mendelson. I just thought you would be interested in hearing about the new release. I think my cert might be bad for some reason. I used porticle to build the cert file, so I think I will try and rebuild it in the morning. Please let me know if you find out anything interesting.

Also, is there a key store building program that you prefer/have had good success with?

Thanks,
Michael

Hi Michael!

I dived into it and found a SHA1 algorithm that was used hardcoded in signing :(((
I fixed this issue now and additionally created a small test files that sends to the Mendelson test server (https://github.com/phax/as2-lib/blob/master/src/test/java/com/helger/as2lib/supplementary/main/MainSendToMendelsonTest.java). It works for me with SHA-256 and SHA-512! You may have a look at the test items from "8/18/15 3:03 PM" at http://testas2.mendelson-e-c.com:8080/webas2/

Concerning OpenAS2 - good to see that it is live again.
Do you have any strong feelings concerning the usage of Apache HttpClient instead of the currently used HttpUrlConnection? I think it would make things much more configurable.

// Philip

Hi Philip,

This is great news! I too have been able to successfully test with Mendelson! The client that I have been trying to use this software with to send AS2 messages is having issues verifying my signature, but the MIC matches on the returned MDN, which I think is weird. I will open a new issue on that to pick your brain on what the issue might be. I don't think it is on my end though...but I guess it could be my cert.

I really don't have any strong feelings using HttpClient vs HttpUrlConnection. I honestly don't have much experience with HttpClient. I have used HttpUrlConnection on an Android project. Getting a connection too work using a self signed SSL certificate turned out to be a real struggle. We eventually did what I think this project does and simply accepts all certs. If HttpClient is easier to use and more flexible, then I think it would be a good move.

Also, I don't think we are able to do this at this time, but sending messages over https would be a great feature as well. I think OpenAS2 is planning to implement this in their next release.

I saw that you added decompression in the commits. Does that mean you will be adding compression in a future release?

Thanks,
Michael

Hi Michael!

I think I will switch to HttpClient in the next minor release - this will also give us https support quite easily. First we need to do the signing right.
If this works for you, I will do a 2.0.2 release.

Concerning the decompression: I added this upon receival only. I will clone the OpenAS2 changes for sending tomorrow - should not be a big deal.

Please confirm that the SHA256 works for you - one step after the other ;-)

// Philip

Hi Philip,

That sounds great.

I can confirm that md5, sha1, sha-256, and sha-512 work if the sign algorithm and requested MDN algorithm is the same. However, if you sign a message with one algorithm, but then request the MDN be signed with a different algorithm, then the MIC verification fails.

If I sign original message with sha-256 and request the MDN in sha-512, this is the error message I get:

[2015-08-18T12:33:01,122] [AS2-SERVER] [INFO ] [Timer-3] mic is not matched, original mic: '3Jti/96av6HoT8+wef24pzYg/3n6jdGkHT0ZMU1MqWG9RUTVdbbpqIPvbKew1CeYrME23CDcQLOl+uOADMUujg==, sha-512' return mic: 'OmWunrdSSVFooymwG7Efn8ezoNAp8WtmLF5yNz+mM5I=, sha-256' [<ph-OpenAS2-18082015123259-0400-3675@mycompanyAS2_mendelsontestAS2>] -- com.helger.as2lib.processor.sender.AS2SenderModule.receiveMDN(AS2SenderModule.java:357)

Mendelson does recognize everything correctly on their end, so the MIC verification in as2-lib is not quite working right. It is almost as if the headers in the returned MDN are not being parsed. I could be wrong here.

Thought: now that we know what the original issue was with signing, should we switch back the algorithm designation from sha-256 to sha256? That way it is consistent with md5 and sha1 usage.

Thanks,
Michael

Also, just as a heads up. From my test with OpenAS2, I was getting a MIC validation error still. I just wanted to mention this to you so that when you merge in what the new OpenAS2 release has, this is not messed up again. I think they are having a similar issue. Might not though because I think that helper file was yours.

I switched BouncyCastle version to the latest - that is where the error came from. I will look into the MIC thing - I can reproduce it. Stay tuned :)

Hi Michael!

Page 28 of https://www.ietf.org/rfc/rfc4130.txt states the following:

 For signed messages, the algorithm used to calculate the MIC MUST be
   the same as that used on the message that was signed. 

So the current behaviour looks correct! So I don't see an issue here anymore.

Concerning the usage of "sha512" and "sha-512" - when I'm sending to Mendelson with "sha512" I'm getting a MIC returned with "sha-512". So I deprecated the old algorithm identifiers without the dash in the middle.

I will now focus on the compression on sending.

// Philip

Hi Michael!

I invested some time on the compression / MIC thingy today and now compression works for sending. I tested it with the Mendelson server with both compress before sign and compress after sign. The MIC calculation was a bit tricky but I think I got it right (at least Mendelson always returns the same) - but I can see the issues with the OpenAS2 implementation here :)

I haven't tested the configuration in the partnership.xml file but it should work like it does in OpenAS2 - if not, drop me a note :)

And because there were plenty of changes, I changed the version number to 2.1.0-SNAPSHOT.

We're getting there....
// Philip

Hi Philip,

Sorry for the slow response. Busy morning. :)

I was wondering about that later in day. I am glad we are sticking to the standard in regards to what algorithm to use during MIC verification. Sticking to standards makes things so much simpler and compatible.

Great news on the compression. I am not immediately using that. Once I figure out this issue I am having with my trading partner, I will test that for you.

So where to from here? This is what I am kind of thinking. Please let me know your thoughts.

  1. Switch httpClient to HttpUrlConnection
  2. Test compression fully.
  3. Improve wiki
  4. Simplify production version.

I can work on 2 and 3 for the most part. I will probably need your help on how some of the partnership files and config files should work. OpenAS2 released some documentation. I didn't know about the back-end port that can be used to manipulate as2-lib while it is running. In terms of 4, needing to use Maven to use the software is a bit cumbersome and could hinder adoption by other users. Really, all we need to do is to perhaps play around with the pom.xml file so that a "production" version is all contained in a single folder. Right now, needing to add the target folder to the class path, with all .class files in target, but all config files in src, which is outside of target is rather confusing.

This is your project, so please let me know if this is the right direction you are thinking and how I can help. After I implement this software with my first trading partner, I will be potentially moving on to getting another trading partner on board. The reliability of this software will be critical, so I am definitely invested. If you agree about the wiki stuff, I will submit a merge request once ready.

Thanks again for everything. I think this project is really turning out to be awesome. :)
Michael

In general that sounds correct/good. More detailed answer tomorrow - sorry.

Sounds great Philip. Thanks.

Hi Michael!

So finally I have time for this :)
Your plan forward sounds absolutely reasonable. I suggest we're creating different issues for the 4 things you mentioned. Points 1 and 4 are definitively my area whereas your help on 2 and 3 is highly appreciated!

This morning (my time) I released version 2.1.0 of as2-lib and as2-server so that a stable, publicly available binary version is out there.

For the details on the single points, please refer to the issues 10-13 (to be created).

Thanks again for your help and your willingness to participate and contribute!

// Philip