<!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">
Serial Number is usually SN, Common Name CN, Country C... Check what
the certificate looks like in MS certificate store.<br>
<br>
Wouter<br>
<br>
Jürgen Heiss wrote:
<blockquote
cite="midFA1AA9F8FB449E42932DDFAADB76783201567D96@exchange-aut.mesonic.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.2900.2180" name="GENERATOR">
<div dir="ltr" align="left"><span class="868411211-10102006"><font
color="#0000ff" face="Arial" size="2">Hi,</font></span></div>
<div dir="ltr" align="left"><span class="868411211-10102006"></span> </div>
<div dir="ltr" align="left"><span class="868411211-10102006"><font
color="#0000ff" face="Arial" size="2">My certificate subject look like
this.</font></span></div>
<div dir="ltr" align="left"><span class="868411211-10102006"></span> </div>
<div dir="ltr" align="left"><span class="868411211-10102006"><font
size="1">Serial Number = xxxxxx</font></span></div>
<div dir="ltr" align="left"><span class="868411211-10102006"><font
size="1">N = Dummy</font></span></div>
<div dir="ltr" align="left"><span class="868411211-10102006"><font
size="1">C = AT</font></span></div>
<div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us"><span
class="868411211-10102006"><font color="#0000ff" face="Arial" size="2"> </font></span></div>
<div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us"><span
class="868411211-10102006"><font color="#0000ff" face="Arial" size="2">How
should look now the function call?</font></span></div>
<div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us"><span
class="868411211-10102006"></span> </div>
<div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us"><span
class="868411211-10102006"><font color="#0000ff" face="Arial" size="2">xmlSecKeyPtr
key = xmlSecKeysMngrFindKey(mngr, (xmlChar *)<span>"Serival number =
xxxxxx N = Dummy c = AT "</span>, keyInfoCtx); </font></span></div>
<div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us"><span
class="868411211-10102006"></span> </div>
<div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us"><span
class="868411211-10102006"><font color="#0000ff" face="Arial" size="2">This
down't work!</font></span></div>
<div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us">
<hr tabindex="-1"></div>
<div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us"><font
face="Tahoma" size="2"><b>From:</b> Wouter Ketting
[<a class="moz-txt-link-freetext" href="mailto:wsh333@gmail.com">mailto:wsh333@gmail.com</a>] <br>
<b>Sent:</b> Dienstag, 10. Oktober 2006 12:06<br>
<b>To:</b> Jürgen Heiss<br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:xmlsec@aleksey.com">xmlsec@aleksey.com</a><br>
<b>Subject:</b> Re: [xmlsec] problems by xmlSecKeysMngrFindKey<br>
</font><br>
</div>
Search by friendly name is not (yet) supported. You could try search by
full subject DN, or apply the patch posted in <a
href="http://www.aleksey.com/pipermail/xmlsec/2006/003560.html">http://www.aleksey.com/pipermail/xmlsec/2006/003560.html
</a>and see whether you are able to retrieve the certificate by
friendly name.<br>
<br>
Wouter<br>
<br>
<div><span class="gmail_quote">On 10/10/06, <b
class="gmail_sendername">Jürgen Heiss</b> <<a
href="mailto:jheiss@mesonic.com"> jheiss@mesonic.com</a>> wrote:</span>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span>Hi Wouter,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span>Yes I use this three Init Functions.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span>I don't get any error, "just" the result is always NULL.</span></font></div>
<div dir="ltr" align="left"><font size="-0"><span></span></font><font
color="#0000ff" face="Arial" size="2"><span>The parm (name) in the
FindKey Function is the friendly name of the cert, or should it be
something else.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span></span></font> </div>
<div dir="ltr" align="left" lang="en-us">
<hr> <font face="Tahoma" size="2"><b>From:</b> Wouter Ketting
[mailto:<a onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:wsh333@gmail.com" target="_blank">wsh333@gmail.com</a>] <br>
<b>Sent:</b> Dienstag, 10. Oktober 2006 11:38<br>
<b>To:</b> Jürgen Heiss<br>
<b>Cc:</b> <a
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:xmlsec@aleksey.com" target="_blank">xmlsec@aleksey.com</a><br>
<b>Subject:</b> Re: [xmlsec] problems by xmlSecKeysMngrFindKey<br>
</font><br>
</div>
<div><span class="e" id="q_10e319d734e6debb_1"> As far as I know it
is the same mechanism as used internally... Did you initialize xmlsec
lib properly (probably a redundant question, but you never know):<br>
<br>
xmlSecInit();<br>
xmlSecCryptoAppInit(NULL);<br>
xmlSecCryptoInit(); <br>
<br>
Also, do you get any error messages anywhere? Or the key is simply not
found?<br>
<br>
Wouter<br>
<br>
<div><span class="gmail_quote">On 10/10/06, <b
class="gmail_sendername">Jürgen Heiss</b> <<a
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:jheiss@mesonic.com" target="_blank"> jheiss@mesonic.com</a>>
wrote:</span>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"
size="2"><span>I forgot to tell that I'm using mscrypto.</span></font></div>
<br>
<div dir="ltr" align="left" lang="en-us">
<hr> <font face="Tahoma" size="2"><b>From:</b> <a
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:xmlsec-bounces@aleksey.com" target="_blank">xmlsec-bounces@aleksey.com</a>
[mailto:<a onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:xmlsec-bounces@aleksey.com" target="_blank">
xmlsec-bounces@aleksey.com</a>] <b>On Behalf Of </b>Jürgen Heiss<br>
<b>Sent:</b> Dienstag, 10. Oktober 2006 11:06<br>
<b>To:</b> <a
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:xmlsec@aleksey.com" target="_blank">xmlsec@aleksey.com</a><br>
<b>Subject:</b> [xmlsec] problems by xmlSecKeysMngrFindKey<br>
</font><br>
</div>
<div><span>
<div><font face="Arial" size="2"><span>I try to Find a Key but it
always returns Null.</span></font></div>
<div><font face="Arial" size="2"><span></span></font> </div>
<div><font face="Arial" size="2"><span></span></font> </div>
<div><font face="Arial" size="2"> xmlSecKeysMngrPtr mngr =
xmlSecKeysMngrCreate(); <br>
xmlSecCryptoAppDefaultKeysMngrInit(mngr);</font></div>
<div> </div>
<div><font face="Arial" size="2"> /* locate and load key you
want to use */<br>
xmlSecKeyInfoCtxPtr keyInfoCtx = xmlSecKeyInfoCtxCreate(mngr);<br>
xmlSecKeyPtr key = xmlSecKeysMngrFindKey(mngr, (xmlChar *)<span>"dummy"</span>,
keyInfoCtx); </font></div>
<div> </div>
<div> </div>
<font size="-0">
<div><span></span><font face="Arial"><font size="2">I<span> my
computer exists a certificate with the name CN=dummy.</span></font></font></div>
<div><font size="-0"><span></span><span></span><font face="Arial"><font
size="2">a<span>ny ideas what went wrong?</span></font><br>
</font></font></div>
</font></span></div>
</div>
<br>
_______________________________________________<br>
xmlsec mailing list<br>
<a onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:xmlsec@aleksey.com" target="_blank">xmlsec@aleksey.com</a><br>
<a onclick="return top.js.OpenExtLink(window,event,this)"
href="http://www.aleksey.com/mailman/listinfo/xmlsec" target="_blank">http://www.aleksey.com/mailman/listinfo/xmlsec</a><br>
<br>
<br>
</blockquote>
</div>
<br>
</span></div>
</div>
</blockquote>
</div>
<br>
</blockquote>
<br>
</body>
</html>