我有一个受信任的第三方根证书。我将此安装到 Windows Server 2008 中的“受信任的根证书颁发机构”证书存储中,但它在未知时间从证书存储中消失。
什么可能导致这种情况?
我在 ac# 命令行应用程序中使用以下代码来安装证书:
X509Certificate2 certificate = new X509Certificate2("trusted-root-cert.cer");
X509Store store = new X509Store(StoreName.AuthRoot, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadWrite);
store.Add(certificate);
store.Close();
Run Code Online (Sandbox Code Playgroud)
每次我发布对应用程序的更改时,证书安装代码都会运行。我看不出这有什么危害,但值得一提。
我安装证书的方式可能有问题。首选的安装方式是什么?