santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pushpalanka Jayawardhana <pushpalankaj...@gmail.com>
Subject Re: Signing multiple files(images, sounds, HTML files, and CSS files)
Date Thu, 31 May 2012 08:21:06 GMT
I get the same error as of previous mail for mp3 files and when I give the
URL of an image file following error occurs.

Exception in thread "main"
org.apache.xml.security.signature.ReferenceNotInitializedException: Invalid
byte 1 of 1-byte UTF-8 sequence.
Original Exception was
org.apache.xml.security.signature.ReferenceNotInitializedException: Invalid
byte 1 of 1-byte UTF-8 sequence.
Original Exception was
org.apache.xml.security.signature.XMLSignatureException: Invalid byte 1 of
1-byte UTF-8 sequence.
Original Exception was
org.apache.xml.security.transforms.TransformationException: Invalid byte 1
of 1-byte UTF-8 sequence.
Original Exception was
org.apache.xml.security.c14n.CanonicalizationException: Invalid byte 1 of
1-byte UTF-8 sequence.
Original Exception was
org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of
1-byte UTF-8 sequence.
at
org.apache.xml.security.signature.Reference.calculateDigest(Reference.java:710)
 at
org.apache.xml.security.signature.Reference.generateDigestValue(Reference.java:396)
 at
org.apache.xml.security.signature.Manifest.generateDigestValues(Manifest.java:206)
at
org.apache.xml.security.signature.XMLSignature.sign(XMLSignature.java:595)

Hope these details will be useful.

On Thu, May 31, 2012 at 1:34 PM, Pushpalanka Jayawardhana <
pushpalankajaya@gmail.com> wrote:

> Hi all,
>
> I want to generate a detached signature for several files of the above
> types. Going through archives I tried following.
>
> *sig.addDocument("/home/pushpalanka/Wookie/trunk/README",transforms,
> Constants.ALGO_ID_DIGEST_SHA1 );*
> *
> *
> But it gives the error,
> [Fatal Error] :1:1: Content is not allowed in prolog.
> Exception in thread "main"
> 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.Reference.calculateDigest(Reference.java:710)
>  at
> org.apache.xml.security.signature.Reference.generateDigestValue(Reference.java:396)
>  at
> org.apache.xml.security.signature.Manifest.generateDigestValues(Manifest.java:206)
>  at
> org.apache.xml.security.signature.XMLSignature.sign(XMLSignature.java:595)
>
> I am grateful for any guidance on the correct way to do this.
> --
> Pushpalanka Jayawardhana | http://pushpalankajaya.blogspot.com
>
> Twitter: http://twitter.com/Pushpalanka | Slideshare:
> http://www.slideshare.net/Pushpalanka
>
>
>


-- 
Pushpalanka Jayawardhana | Undergraduate | Computer Science and Engineering
University of Moratuwa

+94779716248 | http://pushpalankajaya.blogspot.com

Twitter: http://twitter.com/Pushpalanka | Slideshare:
http://www.slideshare.net/Pushpalanka

Mime
View raw message