Hi Isabelle,
We were using SOAP UI initially to make the XML calls and in that process, we discovered that digest values calculated by SAP for the body of the message was different than diest values sent by SOAP UI.
In the custom program, after a lot of blank space removal, carriage return removal, removal of header and footer in certificate, digest values SAP generated matched with digest values being sent by client end. From then on, we rant into certificate error; certificates uploaded to SAP were not matching. We just changed the algorithm of the certificate to RSA and that did the charm.
Good luck!