<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I have installed and built the xmlsec tools under
Windows 2000. They appear to have built correctly, and I am now trying to
use the command line tool (xmlsec) to sign a file, and to get to know the
system.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I copied the template file from the tutorial as
follows:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><?xml version="1.0"
encoding="UTF-8"?><BR><!-- <BR>XML Security Library example: Simple
signature template file for sign1 example. <BR>--><BR><Envelope
xmlns="urn:envelope"><BR> <Data><BR> Hello, World!<BR>
</Data><BR> <Signature xmlns="<A
href="http://www.w3.org/2000/09/xmldsig">http://www.w3.org/2000/09/xmldsig</A>#"><BR>
<SignedInfo><BR> <CanonicalizationMethod
Algorithm="<A
href="http://www.w3.org/TR/2001/REC-xml-c14n-20010315">http://www.w3.org/TR/2001/REC-xml-c14n-20010315</A>"
/><BR> <SignatureMethod Algorithm="<A
href="http://www.w3.org/2000/09/xmldsig#rsa-sha1">http://www.w3.org/2000/09/xmldsig#rsa-sha1</A>"
/><BR> <Reference
URI=""><BR>
<Transforms><BR>
<Transform Algorithm="<A
href="http://www.w3.org/2000/09/xmldsig#enveloped-signature">http://www.w3.org/2000/09/xmldsig#enveloped-signature</A>"
/><BR>
</Transforms><BR>
<DigestMethod Algorithm="<A
href="http://www.w3.org/2000/09/xmldsig#sha1">http://www.w3.org/2000/09/xmldsig#sha1</A>"
/><BR>
<DigestValue></DigestValue><BR>
</Reference><BR>
</SignedInfo><BR>
<SignatureValue/><BR>
<KeyInfo><BR> <KeyName/><BR>
</KeyInfo><BR> </Signature><BR></Envelope></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and when I try to run the command line tool i
get:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>xmlsec --sign templ.xml</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I get a raft of errors:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>CC:\Download\xmlsec\XMLSEC~1.5\win32\binaries>xmlsec --sign templ.xml
--output ou<BR>tput.xml --pkcs12 62NOHASH.P12 --pwd xxxxxxxx, --pubkey-cert-der
cert.cer</FONT></DIV>
<DIV><FONT face=Arial
size=2><BR>func=:file=..\src\keys.c:line=1364:obj=unknown:subj=xmlSecKeysMngrFindKey:error=<BR>1:xmlsec
library function
failed:<BR>func=:file=..\src\xmldsig.c:line=871:obj=unknown:subj=unknown:error=45:key
is no<BR>t
found:<BR>func=:file=..\src\xmldsig.c:line=565:obj=unknown:subj=xmlSecDSigCtxProcessKeyInf<BR>oNode:error=1:xmlsec
library function
failed:<BR>func=:file=..\src\xmldsig.c:line=303:obj=unknown:subj=xmlSecDSigCtxSigantureProc<BR>essNode:error=1:xmlsec
library function failed:<BR>Error: signature failed<BR>Error: failed to sign
file "templ.xml"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I had thought that by starting with the sample
template I could at least check if the tool is working. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am pretty sure it is to do with the way in which
I am specifying my key files etc, but frankly I am not sure what to
do.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>In my sample above, I have commented out my actual
password with 'xxxxxxx' just for the sake of the email.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>My configureation is as follows:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have a pkcs12 password file which contains the
certificate issued by the CA. I also have the password. I can open
this password file, for example, in IIE, so I know my password is
correct.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I exported the certificate to a .der file, and
called it cert.cer</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am now trying to sign the template file, but I
get the errors shown above...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any help would be appreciated...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Stewart Bourke</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>