-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Milan Tomic
Sent: Wednesday, October 13, 2004 11:22 AM
To: [EMAIL PROTECTED]
Subject: [xmlsec] encryption example (xmlsec.exe)
I'm trying to encrypt anything using xmlsec.exe and I fail. I don't know how to specify command line parameters. When I try this:
xmlsec --encrypt --pubkey-cert-der "my.cer" --node-name "firstname" --xml-data "sample.xml" "enc_tmpl.xml"
I got this error:
func=xmlSecKeysMngrGetKey:file=..\src\keys.c:line=1364:obj=unknown:subj=xmlSecKeysMngrFindKey:error=1:xmlsec library function failed:
func=xmlSecEncCtxEncDataNodeRead:file=..\src\xmlenc.c:line=885:obj=unknown:subj=unknown:error=45:key is not found:
func=xmlSecEncCtxXmlEncrypt:file=..\src\xmlenc.c:line=375:obj=unknown:subj=xmlSecEncCtxEncDataNodeRead:error=1:xmlsec library function failed:Error: failed to encrypt xml file "sample.xml"
Error: failed to encrypt file with template "enc_tmpl.xml"What does it mean? It seems that it can't find a key to use for encryption. What did I wrong? Are there examples how to encrypt and decrypt (XML and binary) files using xmlsec.exe?
Similar thing happen when I try to use other templates:
xmlsec --encrypt --pubkey-cert-der "my.cer" --node-name "firstname" --xml-data "sample.xml" "enc_tmpl_cert.xml"
Error message:
func=xmlSecKeysMngrGetKey:file=..\src\keys.c:line=1364:obj=unknown:subj=xmlSecKeysMngrFindKey:error=1:xmlsec library function failed:
func=xmlSecEncCtxEncDataNodeRead:file=..\src\xmlenc.c:line=885:obj=unknown:subj=unknown:error=45:key is not found:
func=xmlSecEncCtxDecryptToBuffer:file=..\src\xmlenc.c:line=643:obj=unknown:subj=xmlSecEncCtxEncDataNodeRead:error=1:xmlsec library function failed:func=xmlSecKeysMngrGetKey:file=..\src\keys.c:line=1364:obj=unknown:subj=xmlSecKeysMngrFindKey:error=1:xmlsec library function failed:
func=xmlSecEncCtxEncDataNodeRead:file=..\src\xmlenc.c:line=885:obj=unknown:subj=unknown:error=45:key is not found:
func=xmlSecEncCtxXmlEncrypt:file=..\src\xmlenc.c:line=375:obj=unknown:subj=xmlSecEncCtxEncDataNodeRead:error=1:xmlsec library function failed:Error: failed to encrypt xml file "sample.xml"
Error: failed to encrypt file with template "enc_tmpl_cert.xml"I'm attaching certificates, source XML (sample.xml) and three template files.
Thank you,
Milan <<...>> <<...>> <<...>> <<...>> <<...>> <<...>>
_______________________________________________ xmlsec mailing list [EMAIL PROTECTED] http://www.aleksey.com/mailman/listinfo/xmlsec
