<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Ed,<br>
<br>
It is hard for me to give advice on Windows but I recall one of the
big changes <br>
between releases was Unicode support. I am not sure how you compiled
the library<br>
but it is strongly recommended to use Unicode support.<br>
<br>
Obviously, the error indicates that we can't find a key in MSCrypto
storage. You are<br>
loading it by name and I can easily see a problem with Unicode
there. Try to debug it <br>
and watch the key name passed to MSCrypto.<br>
<br>
<pre class="moz-signature" cols="72">Aleksey
</pre>
<br>
On 6/18/11 10:59 AM, EdShallow wrote:
<blockquote
cite="mid:BANLkTikZzzeuQ0_7=Trm+Jn8vk3PFXBr4Q@mail.gmail.com"
type="cite">Hi Aleksey,<br>
<br>
The template below work fine with 1.2.13 xmlsec command line
on the same machine and the same crypto keys using all Igor's
1.2.13 binaries.<br>
<br>
I kept everything the same except I compiled your 1.2.18 ....
all clean. I spoke with you yesterday about this. I am using VC7.1
with msvcr71.dll and Igor's includes, libs, and binaries for
libxml, libxslt.<br>
<br>
This signing template works at the command line with Igor's
1.2.13 binaries but does not work with my compiled 1.2.18 dll's.<br>
Igor has not updated his binaries for a very long time. He is
still at 1.2.13 and I need your new mscrypto algorithms introduced
in 1.2.15 <br>
<br>
Any suggestions for me to try ?<br>
<br>
Thanks,<br>
Ed<br>
<br>
Template as follows:<br>
<br>
<?xml version="1.0" encoding="UTF-8"?><br>
<!--<br>
Signature created by XMLDSIG Engine and XMLSec Lib V1.2.18<br>
--><br>
<Document><br>
<Data><br>
<SubData1><br>
<SubSubData1 MimeType="text/plain">This is the
data to be signed.</SubSubData1><br>
<SubSubData2 MimeType="text/plain">This is the
data to be signed.</SubSubData2><br>
<SubSubData3 MimeType="text/plain">This is the
data to be signed.</SubSubData3><br>
</SubData1><br>
<SubData2>This is the data to be
signed.</SubData2><br>
<SubData3>This is the data to be
signed.</SubData3><br>
</Data><br>
<dsig:Signature xmlns:dsig="<a moz-do-not-send="true"
href="http://www.w3.org/2000/09/xmldsig#">http://www.w3.org/2000/09/xmldsig#</a>"><br>
<dsig:SignedInfo><br>
<dsig:CanonicalizationMethod Algorithm="<a
moz-do-not-send="true"
href="http://www.w3.org/TR/2001/REC-xml-c14n-20010315">http://www.w3.org/TR/2001/REC-xml-c14n-20010315</a>"/><br>
<dsig:SignatureMethod Algorithm="<a
moz-do-not-send="true"
href="http://www.w3.org/2000/09/xmldsig#rsa-sha1">http://www.w3.org/2000/09/xmldsig#rsa-sha1</a>"/><br>
<dsig:Reference URI=""><br>
<dsig:Transforms><br>
<dsig:Transform Algorithm="<a
moz-do-not-send="true"
href="http://www.w3.org/2000/09/xmldsig#enveloped-signature">http://www.w3.org/2000/09/xmldsig#enveloped-signature</a>"/><br>
</dsig:Transforms><br>
<dsig:DigestMethod Algorithm="<a
moz-do-not-send="true"
href="http://www.w3.org/2000/09/xmldsig#sha1">http://www.w3.org/2000/09/xmldsig#sha1</a>"/><br>
<dsig:DigestValue></dsig:DigestValue><br>
</dsig:Reference><br>
</dsig:SignedInfo><br>
<dsig:SignatureValue></dsig:SignatureValue><br>
<dsig:KeyInfo><br>
<dsig:KeyName>Shallow, Ed</dsig:KeyName><br>
<dsig:X509Data><dsig:X509Certificate/><dsig:X509SubjectName/><dsig:X509IssuerSerial/><br>
</dsig:X509Data><br>
</dsig:KeyInfo><br>
</dsig:Signature><br>
</Document><br>
<br>
Output from command line tool as follows:<br>
<br>
C:\XMLSec>xmlsec sign --crypto mscrypto --output
inout/edsigned-enveloped.xml tmpl/tmpl-EPM-sign-enveloped.xml<br>
func=xmlSecKeysMngrGetKey:file=..\src\keys.c:line=1370:obj=unknown:subj=xmlSecKeysMngrFindKey:error=1:xmlsec
library function failed: ;last error=-2146885628 (0x80092004);<br>
last error
msg=func=xmlSecDSigCtxProcessKeyInfoNode:file=..\src\xmldsig.c:line=871:obj=unknown:subj=unknown:error=45:key
is not found: ;last error=-2146885628 (0x80092004);last error
msg=func=xmlSecDSigCtxProcessSignatureNode:file=..\src\xmldsig.c:line=565:obj=unknown:subj=xmlSecDSigCtxProcessKeyInfoNode:error=1:xmlsec
library function failed: ;last error=-2146885628 (0x80092004);last
error msg=<br>
func=xmlSecDSigCtxSign:file=..\src\xmldsig.c:line=303:obj=unknown:subj=xmlSecDSigCtxSigantureProcessNode:error=1:xmlsec
library function failed: ;last error=-2146885628 (0x80092004);last
error msg=<br>
Error: signature failed<br>
Error: failed to sign file "tmpl/tmpl-EPM-sign-enveloped.xml"<br>
<br>
Suggestions ?<br clear="all">
<br>
-- <br>
Ed's Contact Information:<br>
Mobile Phone: 613-852-6410<br>
Gmail: <a moz-do-not-send="true"
href="mailto:ed.shallow@gmail.com">ed.shallow@gmail.com</a><br>
VOIP Address: <a moz-do-not-send="true"
href="mailto:107529@sip.ca1.voip.ms">107529@sip.ca1.voip.ms</a><br>
VOIP DID#: 613-458-5004<br>
Skype ID: edward.shallow<br>
Home Phone: 613-482-2090<br>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
xmlsec mailing list
<a class="moz-txt-link-abbreviated" href="mailto:xmlsec@aleksey.com">xmlsec@aleksey.com</a>
<a class="moz-txt-link-freetext" href="http://www.aleksey.com/mailman/listinfo/xmlsec">http://www.aleksey.com/mailman/listinfo/xmlsec</a>
</pre>
</blockquote>
</body>
</html>