首页 > 解决方案 > 无法在 .NET Core 中设置私钥

问题描述

我们已将具有私钥的 Digi 证书存储在 HashiCorp Vault 中。它包含你的东西:证书、名称、私钥。

我正在尝试使用 .NET Core 标准项目读取数据并返回新的 x509 证书:

var crypto = new RSACryptoServiceProvider(parms);
crypto.FromXmlString(Encoding.UTF8.GetString(Convert.FromBase64String(certificationvalue.Data.PrivateKey)));

x509.PrivateKey = crypto; // getting error that operation is not allowed on this platform.

我该如何解决这个错误?

标签: c#.netasp.net-core.net-core

解决方案


推荐阅读