[xmlsec] encryption example (xmlsec.exe)
Milan Tomic
milan at setcce.org
Wed Oct 13 02:57:01 PDT 2004
I've found it. I needed this to add into command line:
--session-key des-192
-----Original Message-----
From: xmlsec-bounces at aleksey.com [mailto:xmlsec-bounces at aleksey.com] On
Behalf Of Milan Tomic
Sent: Wednesday, October 13, 2004 11:22 AM
To: xmlsec at aleksey.com
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=unkno
wn:subj=unknown:error=45:key is not found:
func=xmlSecEncCtxXmlEncrypt:file=..\src\xmlenc.c:line=375:obj=unknown:su
bj=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=unkno
wn:subj=unknown:error=45:key is not found:
func=xmlSecEncCtxDecryptToBuffer:file=..\src\xmlenc.c:line=643:obj=unkno
wn: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=unkno
wn:subj=unknown:error=45:key is not found:
func=xmlSecEncCtxXmlEncrypt:file=..\src\xmlenc.c:line=375:obj=unknown:su
bj=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 <<...>> <<...>> <<...>> <<...>> <<...>> <<...>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.aleksey.com/pipermail/xmlsec/attachments/20041013/41f0e520/attachment-0002.htm
More information about the xmlsec
mailing list