[xmlsec] xml signing binary files

Aleksey Sanin aleksey at aleksey.com
Fri Apr 26 20:08:16 PDT 2019


Just to clarify, this method requires original file to be base64 encoded.

Aleksey

> On Apr 26, 2019, at 7:40 PM, Skip Carter <skip at taygeta.com> wrote:
> 
> Aleksey,
> 
> Thanks for your excellent XMLSEC library, I have been using it for
> several years.  Yet in all that time I have not had the need to use
> xmlsec for signing anything but XML files but now I do.
> 
> How do I sign a binary file ?  I used sign1.c and sign1-tmpl.xml
> as a starting point and set Reference URI to point to the file, but
> sign1 clearly expects to see the file as an XML file:
> 
> Entity: line 1: parser error : Document is empty
> func=xmlSecParserPushBin:file=parser.c:line=182:obj=xml-
> parser:subj=xmlParseChunk:error=5:libxml2 library function
> failed:size=1024
> func=xmlSecTransformPump:file=transforms.c:line=1694:obj=xml-
> parser:subj=xmlSecTransformPushBin:error=1:xmlsec library function
> failed: 
> func=xmlSecTransformCtxUriExecute:file=transforms.c:line=1205:obj=unkno
> wn:subj=xmlSecTransformPump:error=1:xmlsec library function
> failed:uri=debian.jpg
> ...
> 
> Is the an attribute in Reference that should be set for nonxml data ?
> 
> Thanks
> 
> -- 
> Dr Everett (Skip) Carter
> skip at taygeta.com
> 
> Taygeta Scientific Inc
> 607 Charles Ave
> Seaside CA 93955
> 831-641-0645 x103
> 
> 


More information about the xmlsec mailing list