santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Luc Cooke <jlco...@certainkey.com>
Subject Re: Signing multiple files(images, sounds, HTML files, and CSS files)
Date Fri, 01 Jun 2012 18:42:35 GMT
There are none for non XML files. 

Of you are bound an determined to sign raw bytes, you should use  CMS and BouncyCastle

Sent from my iPhone - exucse teh tpyos, I'm all thmuba

On 2012-06-01, at 11:57, Pushpalanka Jayawardhana <pushpalankajaya@gmail.com> wrote:

> Hi Colm,
> 
> Thanks a lot for the explanation.
> I am using 
> TRANSFORM_C14N11_OMIT_COMMENTS - "http://www.w3.org/2006/12/xml-c14n11" algorithm.
>  With you guidance I tried to read more on canonicalization transform for non XML files,
but failed to find any useful resource. Any comments will be so helpful.
> 
> 
> On Fri, Jun 1, 2012 at 7:40 PM, Colm O hEigeartaigh <coheigea@apache.org> wrote:
> 
> The problem is that you are trying to apply an XML canonicalization transform to data
that is not XML. What algorithm(s) is/are in your transform list? 
> 
> Colm.
> 
> 
> On Thu, May 31, 2012 at 9:21 AM, Pushpalanka Jayawardhana <pushpalankajaya@gmail.com>
wrote:
> 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
> 
> 
> 
> 
> 
> -- 
> Colm O hEigeartaigh
> 
> Talend Community Coder
> http://coders.talend.com
> 
> 
> 
> 
> -- 
> Pushpalanka Jayawardhana |
> 

Mime
View raw message