[xmlsec] how does one actualy use the xmlsec1 command utility

Jon Bendtsen bendtsen at diku.dk
Fri Aug 27 04:02:54 PDT 2004


Den 24. aug 2004, kl. 19:01, skrev Aleksey Sanin:

>> I have tried to sign both an .svg and a .jpg, but with both cases it 
>> complains mostly about crypto,
>> or invalid parameters. Both certificates are protected by a password, 
>> and only using jon_bendtsen.key
>> did it ask for a password
> I believe you are missing and important input parameter: a signature
> template. I would recommend to look at the xmlsec tutorial
> 	http://www.aleksey.com/xmlsec/api/xmlsec-notes-sign-encrypt.html
> and a lot of examples in the test/ folder of xmlsec archive.

I made a little progress. I can run the examples in the example dir, but
if i try to embed a html file in between the <Data> and </Data> which i
would expect i could, the result of a sign is:

testhost:/usr/src/xmlsec1-1.2.6/examples# ./sign1 jsign.xml rsakey.pem
jsign.xml:11: parser error : Opening and ending tag mismatch: meta line 
9 and head
</head>
        ^
jsign.xml:38: parser error : Opening and ending tag mismatch: img line 
38 and a
//xmlsoft.org/"><img src="images/libxml2-logo.png" alt="LibXML2" 
border="0"></a>
                                                                         
        ^
jsign.xml:38: parser error : Opening and ending tag mismatch: a line 38 
and td
lsoft.org/"><img src="images/libxml2-logo.png" alt="LibXML2" 
border="0"></a></td
                                                                         
        ^
jsign.xml:39: parser error : Opening and ending tag mismatch: td line 
38 and tr
</tr>
      ^
jsign.xml:42: parser error : Opening and ending tag mismatch: img line 
42 and a
lsoft.org/XSLT"><img src="images/libxslt-logo.png" alt="LibXSLT" 
border="0"></a>
                                                                         
        ^

The embedded html file is your own bugs.html from the docs directory.

I was kind of expecting it to be able to sign any file stuffed in 
between the <Data> and </Data> tag.
Binary files would have to be encoded in another xml file saying
<xml blabla>
   <Binary data>
$@$%&>JCBNYIcu489235
@$%$3453453456
  gogjofgssdf
   </Binary data>
</xml>



JonB




More information about the xmlsec mailing list