The template I used was posted to the list yesterday under my name.<br><br>Cheers and thanks again for working on the wekend ; )<br><br>Ed<br><br><div class="gmail_quote">On Sun, Jun 19, 2011 at 5:32 PM, EdShallow <span dir="ltr"><<a href="mailto:ed.shallow@gmail.com">ed.shallow@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thanks I see that from the code.<br><br>OK, good news and bad news.<br><br>Good news:<br>- my test suite works for crypto=openssl<br>
- most of the test suite works for crypto=mscrypto when KeyName is all characters<br><br>
Bad news:<br>- any certificate the non-alphanumerics in the CN= do not work.I get a ...see below<br><br>Can I trouble you to try compile with Unicode=no and perhaps post both ?<br><br>Cheers,<br>Ed<br><br>C:\XMLSec>xmlsec sign --crypto mscrypto --output inout/edsigned-enveloped.xml tmpl/tmpl-EPM-sign-enveloped.xml<br>
func=xmlSecMSCryptoKeyDataAdoptCert:file=..\src\mscrypto\certkeys.c:line=448:obj=unknown:subj=CryptAcquireCertificatePrivateKey:error=4:crypto library function failed: ;last error=-2146<br>893799 (0x80090019);last error msg=The keyset is not defined.<br>
<br>func=xmlSecMSCryptoCertAdopt:file=..\src\mscrypto\certkeys.c:line=885:obj=unknown:subj=xmlSecMSCryptoPCCDataAdoptPCC:error=1:xmlsec library function failed: ;last error=-<a href="tel:2146893799" value="+12146893799" target="_blank">2146893799</a> (0x8<br>
0090019);last error msg=The keyset is not defined.<br>
<br>func=xmlSecMSCryptoKeysStoreFindKey:file=..\src\mscrypto\keysstore.c:line=539:obj=unknown:subj=xmlSecMSCryptoCertAdopt:error=1:xmlsec library function failed: ;last error=-<a href="tel:2146893799" value="+12146893799" target="_blank">2146893799</a> (0<br>
x80090019);last error msg=The keyset is not defined.<br>
<br>func=xmlSecKeysMngrGetKey:file=..\src\keys.c:line=1370:obj=unknown:subj=xmlSecKeysMngrFindKey:error=1:xmlsec library function failed: ;last error=-<a href="tel:2146885628" value="+12146885628" target="_blank">2146885628</a> (0x80092004);last error msg<br>
=Cannot find object or property.<br>
<br>func=xmlSecDSigCtxProcessKeyInfoNode:file=..\src\xmldsig.c:line=871:obj=unknown:subj=unknown:error=45:key is not found: ;last error=-<a href="tel:2146885628" value="+12146885628" target="_blank">2146885628</a> (0x80092004);last error msg=Cannot find o<br>
bject or property.<br><br>func=xmlSecDSigCtxProcessSignatureNode:file=..\src\xmldsig.c:line=565:obj=unknown:subj=xmlSecDSigCtxProcessKeyInfoNode:error=1:xmlsec library function failed: ;last error=-<a href="tel:2146885628" value="+12146885628" target="_blank">2146885628</a> (0<br>
x80092004);last error msg=Cannot find object or property.<br><br>func=xmlSecDSigCtxSign:file=..\src\xmldsig.c:line=303:obj=unknown:subj=xmlSecDSigCtxSigantureProcessNode:error=1:xmlsec library function failed: ;last error=-<a href="tel:2146885628" value="+12146885628" target="_blank">2146885628</a> (0x80092004);las<br>
t error msg=Cannot find object or property.<br><br>Error: signature failed<br>Error: failed to sign file "tmpl/tmpl-EPM-sign-enveloped.xml"<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Sun, Jun 19, 2011 at 5:19 PM, Igor Zlatković <span dir="ltr"><<a href="mailto:igor@zlatkovic.com" target="_blank">igor@zlatkovic.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I forgot to say, sorry for the waiting.<br>
<br>
I did not remove the code within ifdefs, I removed the #ifdef and #endif<br>
lines. The code within those ifdefs was included in the compilation that<br>
way.<br>
<br>
I compiled with unicode=yes (which was the default). The ifdefs only<br>
mentioned MinGW, not Unicode.<br>
<br>
I a still using the XP DDK. But not for much longer. I will at some<br>
point drop Microsoft compiler in favour of GCC. Newer MS compilers are<br>
harder to tweak to make them use the system runtime.<br>
<br>
Ciao,<br>
Igor<br>
<div><br>
<br>
<br>
On 19/06/11 23:03, EdShallow wrote:<br>
> Yes, I did something similar. I noticed the xxx_s functions exclusively<br>
> within MinGW and Unicode ifdef's.<br>
> Did you just remove all the code within those 2 ifdef's?<br>
> If so use would have had to compile with Unicode=no.<br>
> Is that what you did?<br>
> Thanks again for the Father's Day gift ; )<br>
> Ed<br>
> P.S Are you still compiling with the DDK?<br>
><br>
> On Jun 19, 2011 4:52 PM, "Igor Zlatković" <<a href="mailto:igor@zlatkovic.com" target="_blank">igor@zlatkovic.com</a><br>
</div><div>> <mailto:<a href="mailto:igor@zlatkovic.com" target="_blank">igor@zlatkovic.com</a>>> wrote:<br>
>> Hi Ed,<br>
>><br>
>> I uploaded the latest release, 1.1.18. Please check whether it works for<br>
>> you.<br>
>><br>
>> The newest source for mscrypto backend uses strcpy_s and wcscpy_s<br>
>> runtime functions which are not available on my XP SP3. Frankly, the<br>
>> system runtime (msvcrt.dll) doesn't export them. This source may work<br>
>> with the VS runtime, but not with system runtime. I used the same fix<br>
>> that was meant for MinGW, see the beginning of the file crypto.c. That<br>
>> did it, but I don't know whether that is cool.<br>
>><br>
>> Ciao,<br>
>> Igor<br>
>><br>
>><br>
>> On 18/06/11 05:25, EdShallow wrote:<br>
>>> Hello Igor,<br>
>>><br>
>>> I have valiantly tried to get my Windows binaries working but<br>
>>> without luck. Although I get a clean compile and link with nmake, I am<br>
>>> still getting strange errors with my binaries. I have no problems with<br>
>>> your 1.13 but need the mscrypto algorithms in 1.15 and above.<br>
>>><br>
>>> I am kindly asking that you indulge me and the others waiting for<br>
>>> updated xmlsec binaries.<br>
>>><br>
>>> Thanks in advance,<br>
>>> --<br>
>>> Ed's Contact Information:<br>
>>> Mobile Phone: <a href="tel:613-852-6410" value="+16138526410" target="_blank">613-852-6410</a><br>
>>> Gmail: <a href="mailto:ed.shallow@gmail.com" target="_blank">ed.shallow@gmail.com</a> <mailto:<a href="mailto:ed.shallow@gmail.com" target="_blank">ed.shallow@gmail.com</a>><br>
</div>> <mailto:<a href="mailto:ed.shallow@gmail.com" target="_blank">ed.shallow@gmail.com</a> <mailto:<a href="mailto:ed.shallow@gmail.com" target="_blank">ed.shallow@gmail.com</a>>><br>
<div>>>> VOIP Address: <a href="mailto:107529@sip.ca1.voip.ms" target="_blank">107529@sip.ca1.voip.ms</a> <mailto:<a href="mailto:107529@sip.ca1.voip.ms" target="_blank">107529@sip.ca1.voip.ms</a>><br>
</div>> <mailto:<a href="mailto:107529@sip.ca1.voip.ms" target="_blank">107529@sip.ca1.voip.ms</a> <mailto:<a href="mailto:107529@sip.ca1.voip.ms" target="_blank">107529@sip.ca1.voip.ms</a>>><br>
<div><div></div><div>>>> VOIP DID#: <a href="tel:613-458-5004" value="+16134585004" target="_blank">613-458-5004</a><br>
>>> Skype ID: edward.shallow<br>
>>> Home Phone: <a href="tel:613-482-2090" value="+16134822090" target="_blank">613-482-2090</a><br>
>>><br>
>><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br></div></div>-- <br><div class="im">Ed's Contact Information:<br>Mobile Phone: <a href="tel:613-852-6410" value="+16138526410" target="_blank">613-852-6410</a><br>
Gmail: <a href="mailto:ed.shallow@gmail.com" target="_blank">ed.shallow@gmail.com</a><br></div><div class="im">VOIP Address: <a href="mailto:107529@sip.ca1.voip.ms" target="_blank">107529@sip.ca1.voip.ms</a><br></div><div>
<div></div><div class="h5">
VOIP DID#: <a href="tel:613-458-5004" value="+16134585004" target="_blank">613-458-5004</a><br>Skype ID: edward.shallow<br>Home Phone: <a href="tel:613-482-2090" value="+16134822090" target="_blank">613-482-2090</a><br><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Ed's Contact Information:<br>Mobile Phone: 613-852-6410<br>Gmail: <a href="mailto:ed.shallow@gmail.com">ed.shallow@gmail.com</a><br>VOIP Address: <a 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>