首页 > 解决方案 > X509certificate2 安全警告

问题描述

当我尝试向 X509Store 添加新证书时,会出现警告。有成千上万的证书,警告窗口破坏了自动化

var store = new X509Store(StoreName.Root, StoreLocation.CurrentUser);
var someCert = new X509Certificate2();
store.Add(someCert);

在不更改我的StoreNameStoreLocation设置的情况下如何避免这种情况?

标签: c#.netx509certificate2

解决方案


简单的答案:你不能。对话框弹出调用在 Crypt32.dll 中硬编码。


推荐阅读