santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pushpalanka Jayawardhana <pushpalankaj...@gmail.com>
Subject Signing multiple files(images, sounds, HTML files, and CSS files)
Date Thu, 31 May 2012 08:04:24 GMT
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

Mime
View raw message