[xmlsec] Cannot sign anything

Pierre THIERRY pierre.thierry at moine-fou.org
Sat Jul 12 08:31:29 PDT 2003


Hi,

I just dicovered the xmlsec library and command-line utilty today, but
even after reading the manpage and website, I didn't manage to sign
anything.

I even tried an example found here :

http://www.aleksey.com/xmlsec/api/xmlsec-examples-sign-template-file.html#XMLSEC-EXAMPLE-SIGN1-TMPL

I created the sign1-tmpl.xml file, and tried some commands :

pierre at bateleur:~/tmp$ xmlsec1 --sign --privkey-pem ~/.openssl/pierre.pem --output sign1-sig.xml sign1-tmpl.xml
Enter PEM pass phrase:
func=xmlSecKeysMngrGetKey:file=keys.c:line=924:obj=unknown:subj=xmlSecKeysMngrFindKey:error=1:xmlsec library function failed:
func=xmlSecDSigCtxProcessKeyInfoNode:file=xmldsig.c:line=871:obj=unknown:subj=unknown:error=45:key is not found:
func=xmlSecDSigCtxProcessSignatureNode:file=xmldsig.c:line=565:obj=unknown:subj=xmlSecDSigCtxProcessKeyInfoNode:error=1:xmlsec library function failed:
func=xmlSecDSigCtxSign:file=xmldsig.c:line=303:obj=unknown:subj=xmlSecDSigCtxSigantureProcessNode:error=1:xmlsec library function failed:
Error: signature failed
Error: failed to sign file "sign1-tmpl.xml"
pierre at bateleur:~/tmp$ xmlsec1 --sign --node-name http://www.w3.org/2000/09/xmldsig:Signature --privkey-pem ~/.openssl/pierre.pem --output
sign1-sig.xml sign1-tmpl.xml
Enter PEM pass phrase:
Error: failed to find node with name="Signature"
Error: failed to load template "sign1-tmpl.xml"
Error: failed to sign file "sign1-tmpl.xml"
pierre at bateleur:~/tmp$ xmlsec1 --sign --node-xpath /Enveloppe/Signature --privkey-pem ~/.openssl/pierre.pem --output sign1-sig.xml sign1-tmpl.xml
Enter PEM pass phrase:
Error: xpath expression evaluation does not return a single node as expected
Error: failed to load template "sign1-tmpl.xml"
Error: failed to sign file "sign1-tmpl.xml"

How can I find some examples or further documentation to understand how
to sign an XML document ?

Technically,
le Moine Fou
-- 
pierre.thierry at moine-fou.org
OpenPGP 0xD9D50D8A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.aleksey.com/pipermail/xmlsec/attachments/20030712/b84402a5/attachment.bin


More information about the xmlsec mailing list