2
有誰知道我將如何使用非託管 C++,即通過指紋從X509證書存儲中查詢證書,來執行與下面的C#代碼等價的操作?使用非託管C++訪問X509證書存儲
var store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
var allCerts = store.Certificates;
foreach (var certificate in from X509Certificate2 certificate in allCerts
where certificate.Thumbprint != null
&& certificate.Thumbprint.Equals(thumbprint, StringComparison.OrdinalIgnoreCase)
select certificate)
{
return certificate;
}
在此先感謝
戴夫