Hi Team.
I am currently setting up an AS2 communication , and I am encountering an issue while transmitting EDI messages through the system. Here is a detailed explanation of the issue:
When I send an EDI message without encryption, and use base64 encoding, the message is successfully received and processed.
However, when I use encryption (with matching certificates and the same encryption method on both ends), I consistently receive the following error message:
"There is an error in receiving the EDI message. Error message: Decryption failed."
I have verified that the encryption algorithm, certificates, and private/public key pairs all match. Additionally, I have confirmed that both the public certificate for encryption and the private key for decryption are configured correctly on both sides.
Interestingly, when I manually decrypt the encrypted message using the same private key on my local machine, the decryption is successful, and I am able to read the message.
I would appreciate any assistance in resolving this issue as it seems to be specific to the AS2 communication process, and the decryption error only occurs when the message is encrypted.
Here is a summary of the steps I've followed:
Encrypted the EDI file using the public certificate (using the correct encryption algorithm).
Sent the encrypted file with the correct headers and base64 encoding in the curl request.
Received the error: "Decryption failed".
Please let me know if you need any additional information or if there are specific configurations I may have missed.
Thanks