received MDN error: content hash found in signed attributes different

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
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€10 +

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









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
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

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


Philip,
OpenSSL. This is very powerful but not that easy to use because it uses command line commands.
This is the project page:
This is a page that contains useful samples and hints on how to use OpenSSL:
http://www.madboa.com/geek/openssl/
Regards
Heller

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
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

© 1999-2007 mendelson-e-commerce GmbH. All right reserved.
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