It seems that whitespace in the x509 certificate is not a problem, because
the certificate is not used in computing the digest, but whitespace in the
business message is.

Is it possible for Xerces not to mess with whitespace from base64 text
nodes?

Or must this be defined at XSD level, i.e. somehow make whitespace part of
the allowed characters (not discardable)?

João M. S. Silva


On Tue, Jun 4, 2019 at 11:52 AM João M. S. Silva <
[email protected]> wrote:

> Hi,
>
> When I parse an XML file with a x509 certificate in it, Xerces transforms
> the newlines in the x509 certificate (these certificates usually break
> lines at column 64) and transforms those into spaces:
>
> parser->resetDocumentPool();
> parser->parse(*input);
> *document = parser->getDocument();
>
> Later on, Apache Santuario is not able to verify the signature of the XML
> message, because the digest does not match: newlines were replaced by
> spaces.
>
> How can I tell Xerces to parse the XML message as it is, i.e. don't
> convert newlines in space, at least in the x509 certificate?
>
> Thanks.
>
> João M. S. Silva
>

Reply via email to