Hi all!!

I am trying to sign (detached) some base64-encoded data along with a SignatureProperty (SigningTime). If I base64-decode the data before signing and specify C14N transform for the SignatureProperty, everything is OK; however, if I do not base64-decode the data but I include Base64-decode transformation instead, keeping C14NTransform for SignatureProperty, I get the following exception at signing time:

[Fatal Error] :1:1: Content is not allowed in prolog.
org.apache.xml.security.signature.XMLSignatureException: Content is not allowed in prolog. Original Exception was org.apache.xml.security.signature.ReferenceNotInitializedException: Content is not allowed in prolog. Original Exception was org.apache.xml.security.signature.ReferenceNotInitializedException: Content is not allowed in prolog. Original Exception was org.apache.xml.security.signature.XMLSignatureException: Content is not allowed in prolog. Original Exception was org.apache.xml.security.transforms.TransformationException: Content is not allowed in prolog. Original Exception was org.apache.xml.security.c14n.CanonicalizationException: Content is not allowed in prolog. Original Exception was org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at org.apache.xml.security.signature.XMLSignature.sign(Unknown Source)

Could somebody so kind as to tell me what is wrong, please?

Thanks in advance.

Marina.

_________________________________________________________________
Moda para esta temporada. Ponte al día de todas las tendencias. http://www.msn.es/Mujer/moda/default.asp

Reply via email to