[xmlsec] Cannot sign anything

Aleksey Sanin aleksey at aleksey.com
Sat Jul 12 08:28:50 PDT 2003


>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:
>
The library could not find the signature key. The original template uses 
RSA signatures.
Make sure that ~/.openssl/pierre.pem file has an RSA private key and try 
again.

>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"
>
There is a '#' at the end of XMLDSig namespace 
"http://www.w3.org/2000/09/xmldsig#".
In your command line it is missing.

>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:
>  
>
You have a spelling mistake in the command line: "Enveloppe" should be 
"Envelope".

>How can I find some examples or further documentation to understand how
>to sign an XML document ?
>  
>
There are a lot of examples in the source package. Check examples/ and 
tests/ folders.

With best regards,
Aleksey






More information about the xmlsec mailing list