received MDN error: content hash found in signed attributes different

edlipski

Hello,
Hoping you can help with the below problem.

I'm in a testing mode with a trading partner who is successfully receiving an EDI X12 document and sending out a successful MDN. However when my m-e-c-AS2 receives the MDN I get the below error:
...content hash found in signed attributes different.

I noticed that the MDN signature, that m-e-c-AS2 sends, has a transfer encoding of base 64. However my trading partner is sending a binary signature.

Can m-e-c-AS2 accept a binary encoded signature? If so what else could be causing the error?

Thank you.
Ed



heller
heller's picture
Ed, If the header

Ed,

If the header "Content-Transfer-Encoding" is set in the signature part the signature is decoded before checked. If it is not set or set to binary no decoding should happen.

What value is used for the signatures part header "Content-Transfer-Encoding" in your message?

Regards
Heller



edlipski
The signature

The signature content-Transfer-Encoding value:

Content-Transfer-Encoding: binary

Thanks.
Ed



edlipski
error: content hash found in signed attributes different

Here is a cut-and-paste of the MDN that creates the error message:

HTTP/1.1 100 Continue
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Subject: amazon;tpcxhub
Recipient-Address: http://localhost/ediint/ediintReceiver.jsp
AS2-To: amazon
From: tpcxhub
Message-ID: <#1190901493527mec_as2-1190901492573-7@amazon_tpcxhub>
Mime-Version: 1.0
AS2-From: tpcxhub
Content-Type: multipart/signed; boundary="----=_Part_3_6160567.1190901493527"; protocol="application/pkcs7-signature"; micalg="sha1"
Content-Length: 2400
Date: Thu, 27 Sep 2007 13:58:13 GMT
Connection: close

------=_Part_3_6160567.1190901493527

Content-Type:multipart/report; boundary="----=_1190901493495"; report-type=disposition-notification

------=_1190901493495

Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
The MDN Response Message is for:

Message-id:
From: amazon
Date received:Thu Sep 27 09:58:13 EDT 2007

------=_1190901493495
Content-Type: message/disposition-notification
Content-Transfer-Encoding: 7bit
Reporting-UA: yar-dev-726km21
Disposition: automatic-action/MDN-sent-automatically; processed

Original-Message-ID:
Original-Recipient: rfc822; tpcxhub
Final-Recipient: rfc822; tpcxhub
Received-Content-MIC: el2WY+k6tQ0YFyGy4NIocmqE08Y=, sha1

------=_1190901493495--

------=_Part_3_6160567.1190901493527

Content-Type: application/pkcs7-signature
Content-Transfer-Encoding: binary

0€ *†H†÷
 €0€1 0 +



heller
heller's picture
edlipski,

edlipski,

I have really no idea about this issue so far. Is this productive or could you send me the whole directory zipped (without jre)

Regards
Heller



redfuse
same problem

hi there,

any solution so for this problem so far?

when i send a message to my partner, everything works fine. if i receive a message from the same partner i get this error:

xxxxx Eingehende Übertragung ist eine AS2 Nachricht,
Rohdatengrösse: 4,00 KB

xxxxxx: AS2 Nachricht ist nicht verschlüsselt.

xxxxxx: AS2 Nachricht ist digital signiert.
xxxxxx: Benutze das Zertifikat "xxxx" zum Überprüfen
xxxxxx: Ausgehende MDN wurde mit dem Algorithmus "SHA1" signiert.
xxxxxx: MDN erstellt, Status auf [processed/error: authentication-failed] gesetzt.
xxxxxx:
MDN Details:
--------------
Error verifying the senders digital signature: invalid signature format in message:
content hash found in signed attributes different.
--------------

Header:
-------------------------------------------------
host = xxxx:8080
accept-encoding = deflate, gzip, x-gzip, compress, x-compress
connection = Close, TE
date = Tue, 02 Oct 2007 07:06:20 GMT
content-type = multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="1191308780075GEGXS-AS2Message"
as2-from = xxxxx
mime-version = 1.0
disposition-notification-options = signed-receipt-protocol=optional,pkcs7-signature; signed-receipt-micalg=optional,sha1
message-id =
te = trailers, deflate, gzip, compress
user-agent = RPT-HTTPClient/0.3-3I (Linux)
disposition-notification-to = http://xxxx
content-length = 4734
from = xxxx
as2-to = xxxx
as2-version = 1.1
subject = AS2 Data Message Request
--------------------------------------------------

Any ideas??

thank you

red



heller
heller's picture
redfuse,

redfuse,

Could you please send me your as2 directory, zipped, without jre? I have no idea so far and haven't received a sample.

Regards
Heller



heller
heller's picture
This has been fixed and will

This has been fixed and will be available in the next release.

Regards
Heller



geschu
heller, thanks for adressing

heller,

thanks for adressing this problem - I also experience it with one business partner. When do you plan to build the next release?
btw, mec as2 is really great!

regards,
geschu



heller
heller's picture
geschu, thank you. We have

geschu,

thank you. We have no idea so far when to release the next version but I think it will be early next year.

Regards
Heller



Slobodan
Slobodan's picture
content hash found in signed attributes different

Hello,

I have exactly the same problem with receiving, like edlipski... When do you plan to build the next release?

--

Slobo



heller
heller's picture
Slobo,

Slobo,

we have released it already last week, it contains the code that should fix this problem. Are you using the build 21?

Regards
Heller



Slobodan
Slobodan's picture
received MDN error: content hash found in signed attributes diff

Hi,

Thanks, I will try to use build 21.

Slobo

--

Slobo



heller
heller's picture
Slobo,

Slobo,

ok, please post a feedback if this version works fine for you. Else we will investigate the problem.

Regards
Heller



mourovaz
Causes of the problem

Hello Heller,

What was the real problem? Can you give me a brief explanation of the causes of the error?

Thanks in advance.

Kind Regards,

MouroVaz



heller
heller's picture
mourovaz, I think it was a

mourovaz,

I think it was a content transfer encoding problem.

Regards
Heller



pkoch
Same problem

I get the same problem. I first had the problem with build 19. I then read this thread and then installed build 21. Unfortunately I get the same problem.

Please can you help?



heller
heller's picture
pkoch,

pkoch,

not without more information. This error message means that the receipt server could not verify the signature of the sender in the message/mdn. This could have several reasons:

*The receiver does not use the public key of the sender to verify its signature

*The message content has been changed somehow after it has been signed (e.g. by a content transfer encoding error)

*Security package/key incompatibilities (e.g. between bouncycastle and OpenSSL)

*A bug in m-e-c as2 or the partner server

*Signature incompatibilities

Regards
Heller



pkoch
Hi Heller Sorry, I can tell

Hi Heller

Sorry, I can tell that my description was not complete enough. My problem is similar to the one first described in this thread. That is, I can send a message to another party without any problem, however, when this party sends me a message the error is issued. If there is something wrong with the certificates, why is a message successfully sent (a synchronous MDN is also successfully received) but when a message is received there is a problem?

Regards
Philip



heller
heller's picture
Philip, Are you sure you

Philip,

Are you sure you have set the right certificate to verify your partners signature in the partner panel (security)?

Regards
Heller



pkoch
Hi Heller I think the

Hi Heller

I think the certificate is correct. I got a certificate from the partner in a file with a .p7b extension. I then had to open that certificate in windows. It displayed a root chain. I then selected the lowest level certificate and exported it in base-64 encoded x.509 CER format. This certificate was then imported into the key store with Portecle.

Does this sound right? Is there a way to see why the authentication fails?

Regards
Philip



heller
heller's picture
Philip, It would be better

Philip,

It would be better to use portecle to import the certificate directly. .p7b indicates that this may be a PKCS #7 certificate, portecle should have no problem with it.

Regards
Heller



pkoch
Hi Heller Portecle does not

Hi Heller

Portecle does not import the certificate. I have tried but it would not. Can you give me any other suggestions?

Regards
Philip



heller
heller's picture
Philip, OpenSSL. This is

Philip,

OpenSSL. This is very powerful but not that easy to use because it uses command line commands.

This is the project page:

http://www.openssl.org/

This is a page that contains useful samples and hints on how to use OpenSSL:

http://www.madboa.com/geek/openssl/

Regards
Heller



pkoch
Hi Heller Thanks for your

Hi Heller

Thanks for your reference but my question is if there is a way that I can debug what is going wrong in the MEC-AS2 software?

Regards
Philip



heller
heller's picture
Philip,

Philip,

The verification process could not be debugged, it runs in an external lib (bouncycastle). The errormessage "content hash found in signed attributes different" is an error message this library provides.
But you could go ahead to see if this is a certificate issue or a m-e-c as2 issue: is it possible for you to exchange data with an other partner (signed)? Does there occure the same problem? Which vendor is the other as2 server from? Could you compare the certificate fingerprint between you and your partner? Are they the same?

Regards
Heller



pkoch
Another symptom

Hi Heller

I have noticed another symptom. When I look at the incoming message’s details the raw message is all gibberish. It seems either encrypted or corrupted. Is this normal or might it be indicative of the problem?

If I compare this to another partner’s messages it looks different in that I can see intelligible contents in the raw message of the partner for which we can successfully send and receive messages.

Regards
Philip



heller
heller's picture
Philip, lets fix this

Philip,

lets fix this problem per email, I think I need more information about this issue. Please contact me at sh at mendelson dot de

Regards
Heller




© 1999-2007 mendelson-e-commerce GmbH. All right reserved.