<!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.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I use something like this (from 
Delphi):</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dwSize 
:= 0;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dwSize := 
CertNameToStr(X509_ASN_ENCODING, pCertContext^.pCertInfo^.Subject, 
CERT_SIMPLE_NAME_STR, nil, 
dwSize);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
SetLength(sCertSimpleNameStr, 
dwSize-1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
CertNameToStr(X509_ASN_ENCODING, pCertContext^.pCertInfo^.Subject, 
CERT_SIMPLE_NAME_STR, PChar(sCertSimpleNameStr), dwSize);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>This will work fine later with 
xmlSecKeysMngrFindKey. Don't know if it will help in your case 
though.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>/Erik</DIV>
<DIV><BR></DIV></FONT></BODY></HTML>