Hi, Derek! I absolutelly don't like cleanup_crlf() function. All white spaces and carraige returns *are* part of the XML document. Removing \n *changes* the documents. I am really surprised that you are able to get digest verified. Will you mind to send an example of XML document you are signing, please? Aleksey