我必须使用存储在安全令牌中的证书。我可以从Windows证书存储中访问它,但该设备有一个密码,因此会显示一个带有输入字段的弹出窗口。
以下是我用于加载证书的代码:
static X509Certificate2 BuscarCertificado
(StoreLocation location, StoreName name,
X509FindType findType, string findValue)
{
X509Store store = new X509Store(name, location);
try{
store.Open(OpenFlags.ReadOnly);
X509Certificate2Collection col = store.Certificates.Find
(findType, findValue, true);
return col[0];
}
finally { store.Close(); }
}
设备是ACS CryptoMate64 0。
是否可能在代码中发送密码,以避免显示此消息?
感谢任何帮助。