<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=984045609-13102004> I've found it. I needed this to
add into command line:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=984045609-13102004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=984045609-13102004>--session-key des-192</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=984045609-13102004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=984045609-13102004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
xmlsec-bounces@aleksey.com [mailto:xmlsec-bounces@aleksey.com] <B>On Behalf Of
</B>Milan Tomic<BR><B>Sent:</B> Wednesday, October 13, 2004 11:22
AM<BR><B>To:</B> xmlsec@aleksey.com<BR><B>Subject:</B> [xmlsec] encryption
example (xmlsec.exe)<BR><BR></FONT></DIV><!-- Converted from text/rtf format --><BR>
<P> <FONT face="Arial CE" size=2>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:</FONT></P>
<P><FONT face="Arial CE" size=2>xmlsec --encrypt --pubkey-cert-der "my.cer"
--node-name "firstname" --xml-data "sample.xml" "enc_tmpl.xml"</FONT> </P>
<P> <FONT face="Arial CE" size=2>I
got this error:</FONT> </P>
<P><FONT face="Arial CE"
size=2>func=xmlSecKeysMngrGetKey:file=..\src\keys.c:line=1364:obj=unknown:subj=xmlSecKeysMngrFindKey:error=1:xmlsec
library function failed:</FONT></P>
<P><FONT face="Arial CE"
size=2>func=xmlSecEncCtxEncDataNodeRead:file=..\src\xmlenc.c:line=885:obj=unknown:subj=unknown:error=45:key
is not found:</FONT> <BR><FONT face="Arial CE"
size=2>func=xmlSecEncCtxXmlEncrypt:file=..\src\xmlenc.c:line=375:obj=unknown:subj=xmlSecEncCtxEncDataNodeRead:error=1:xmlsec
library function failed:</FONT></P>
<P><FONT face="Arial CE" size=2>Error: failed to encrypt xml file
"sample.xml"</FONT> <BR><FONT face="Arial CE" size=2>Error: failed to encrypt
file with template "enc_tmpl.xml"</FONT> </P>
<P> <FONT face="Arial CE"
size=2>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?</FONT></P>
<P> <FONT face="Arial CE"
size=2>Similar thing happen when I try to use other templates:</FONT> </P>
<P><FONT face="Arial CE" size=2>xmlsec --encrypt --pubkey-cert-der "my.cer"
--node-name "firstname" --xml-data "sample.xml" "enc_tmpl_cert.xml"</FONT>
</P>
<P> <FONT face="Arial CE"
size=2>Error message:</FONT> </P>
<P><FONT face="Arial CE"
size=2>func=xmlSecKeysMngrGetKey:file=..\src\keys.c:line=1364:obj=unknown:subj=xmlSecKeysMngrFindKey:error=1:xmlsec
library function failed:</FONT></P>
<P><FONT face="Arial CE"
size=2>func=xmlSecEncCtxEncDataNodeRead:file=..\src\xmlenc.c:line=885:obj=unknown:subj=unknown:error=45:key
is not found:</FONT> <BR><FONT face="Arial CE"
size=2>func=xmlSecEncCtxDecryptToBuffer:file=..\src\xmlenc.c:line=643:obj=unknown:subj=xmlSecEncCtxEncDataNodeRead:error=1:xmlsec
library function failed:</FONT></P>
<P><FONT face="Arial CE"
size=2>func=xmlSecKeysMngrGetKey:file=..\src\keys.c:line=1364:obj=unknown:subj=xmlSecKeysMngrFindKey:error=1:xmlsec
library function failed:</FONT></P>
<P><FONT face="Arial CE"
size=2>func=xmlSecEncCtxEncDataNodeRead:file=..\src\xmlenc.c:line=885:obj=unknown:subj=unknown:error=45:key
is not found:</FONT> <BR><FONT face="Arial CE"
size=2>func=xmlSecEncCtxXmlEncrypt:file=..\src\xmlenc.c:line=375:obj=unknown:subj=xmlSecEncCtxEncDataNodeRead:error=1:xmlsec
library function failed:</FONT></P>
<P><FONT face="Arial CE" size=2>Error: failed to encrypt xml file
"sample.xml"</FONT> <BR><FONT face="Arial CE" size=2>Error: failed to encrypt
file with template "enc_tmpl_cert.xml"</FONT> </P>
<P> <FONT face="Arial CE" size=2>I'm
attaching certificates, source XML (sample.xml) and three template
files.</FONT> </P>
<P><FONT face="Arial CE" size=2>Thank you,</FONT> <BR><FONT face="Arial CE"
size=2>Milan<FONT face=Arial color=#000000 size=2> <<...>>
</FONT><FONT face=Arial color=#000000 size=2><<...>> </FONT><FONT
face=Arial color=#000000 size=2><<...>> </FONT><FONT face=Arial
color=#000000 size=2><<...>> </FONT><FONT face=Arial color=#000000
size=2><<...>> </FONT><FONT face=Arial color=#000000
size=2><<...>> </FONT></FONT></P></BLOCKQUOTE></BODY></HTML>