c# - 无法在 .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.
我该如何解决这个错误?
解决方案
推荐阅读
- python - Plotly:如何在 Choropleth 地图上显示州线
- javascript - Chrome 和服务器之间的 QUIC 通信
- javascript - 如何将数组从 NodeJS 传递到 Python 脚本?
- rust - `push label` 推送 [label],而不是 label 的地址(Rust asm!)
- node.js - Keep failing passing arrays to axios.get request to retrieve data from Mongoose
- c# - WPF 并行运行多个任务(selenium webdrivers)无法正常工作
- mongodb - 为字母数字字段创建 mongo db 索引的正确方法
- java - 向 API 传递多个参数
- flutter - 如何修复 Flutter 错误消息:颜色不是类型?
- reactjs - 使用 Lambda 函数 + API 网关将图像从 ReactJS 上传到 AWS S3