I am trying generate the correct return message integrity check (MIC) for mendelson AS2 server to validate against using openssl. However even using the orignal sent payload data my digest comes up with a different value and I cannot see what I am doing wrong.
Mendelson reports
The Message Integrity Code (MIC) does not match the sent AS2 message (required: 9SivZLL9PbyioTu2z6Xj7qCbLS8=, sha1, returned: k5x12GjjKWWX63R2pf+V/jVKXgQ=, sha1).
openssl dgst -binary -sha1 <filename> | base64
Is my openssl command usage wrong?
This is my payload data
Date: Fri, 5 Feb 2021 09:42:06 +0000 (GMT)
------=_Part_88_23367641.1612518126911
Content-Type: application/EDI-consent
Content-Transfer-Encoding: binary
Content-Disposition: attachment; filename=delivery1.csv
deliveryId,action,supplierId,siteId,clientId,deliveryType,hostComments,deliveryStartTime,deliveryEndTime
20210111001,UPDATE,PARM OLIVE,BAWTRY,COLGATE,SUPPLIER,Call Bob before delivery,2021-02-01 00:00:00Z,2021-02-16 12:00:00Z
------=_Part_88_23367641.1612518126911
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
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIAwggQlMIID
DaADAgECAgRaKlscMA0GCSqGSIb3DQEBCwUAMIG6MSMwIQYJKoZIhvcNAQkBFhRzZXJ2aWNlQG1l
bmRlbHNvbi5kZTELMAkGA1UEBhMCREUxDzANBgNVBAgMBkJlcmxpbjEPMA0GA1UEBwwGQmVybGlu
MSIwIAYDVQQKDBltZW5kZWxzb24tZS1jb21tZXJjZSBHbWJIMSEwHwYDVQQLDBhEbyBub3QgdXNl
IGluIHByb2R1Y3Rpb24xHTAbBgNVBAMMFG1lbmRlbHNvbiB0ZXN0IGtleSAzMB4XDTE3MTIwODA5
Mjc1NloXDTI3MTIwNjA5Mjc1NlowgboxIzAhBgkqhkiG9w0BCQEWFHNlcnZpY2VAbWVuZGVsc29u
LmRlM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ZIhvcNAQkBFhRzZXJ2aWNlQG1lbmRlbHNvbi5kZTELMAkGA1UEBhMCREUxDzANBgNVBAgMBkJl
cmxpbjEPMA0GA1UEBwwGQmVybGluMSIwIAYDVQQKDBltZW5kZWxzb24tZS1jb21tZXJjZSBHbWJI
MSEwHwYDVQQLDBhEbyBub3QgdXNlIGluIHByb2R1Y3Rpb24xHTAbBgNVBAMMFG1lbmRlbHNvbiB0
ZXN0IGtleSAzAgRaKlscMAkGBSsOAwIaBQCggb4wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAc
BgkqhkiG9w0BCQUxDxcNMjEwMjA1MDk0MjA2WjAjBgkqhkiG9w0BCQQxFgQU9SivZLL9PbyioTu2
z6Xj7qCbLS8wKQYJKoZIhvcNAQk0MRwwGjAJBgUrDgMCGgUAoQ0GCSqGSIb3DQEBAQUAMDQGCSqG
SIb3DQEJDzEnMCUwCgYIKoZIhvcNAwcwDgYIKoZIhvcNAwICAgCAMAcGBSsOAwIHMA0GCSqGSIb3
DQEBAQUABIIBAHCfifmgiNLOi9jUhcqq6AMHGh6pns/17bplBbwCmQB7CtwyFt1Bu9D6y3w25gsg
mavgXWetxvX53LkEtZjKh7TOlDW/Ds+lYsQadzhaogiQYjd0qRErDpkPiGkbY1jrGsUX6uAVvNK0
WKtaqrqxSSD3gADe4Po5rUd3oyIoDRj7vwuvZKEVuOOaBI0/U9lMbhq2lxSDF8WfInFdLCCg5H1D
qwUYGYA671cKwNLTvjimtqitZMyZmDoOhXgl1neyjZYfnXHM9yeA7x+0tTgjwHMk6+8e6UGljhCv
VZ1aaS7MScapVCRmwU+Ft+mlpvUcCkG+IMO5F0ypneyo1fFTMIQAAAAAAAA=
------=_Part_88_23367641.1612518126911--
question from:
https://stackoverflow.com/questions/66061100/as2-sha1-calculation-of-digest-using-openssl 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…