I try code from OverbyteIcsPemTool to export certificate from 'MY' windows store:
xTmp := f_d2i_X509(nil, @pCertContext.pbCertEncoded, pCertContext.cbCertEncoded);
if Assigned(xTmp) then begin
X.X509 := xTmp;
f_X509_free(xTmp);
…
end;
however, this does not return private key (X.PrivateKey := nil).
It does some additional code?
Milan