System.Security.Cryptography.X509Certificates 中的自定义扩展

发布于 2024-09-07 06:54:21 字数 226 浏览 6 评论 0原文

.NET 类 System.Security.Cryptography.X509Certificates.X509Extension 不支持我想要解析的某些 X.509 扩展(主题备用名称、名称约束)。此类的 MSDN 页面声明“可以在 CryptoConfig 文件中注册自定义扩展”(链接),但 CryptoConfig 类的描述仅讨论设置自定义加密算法实现 - 如何注册自定义 X. 509分机。

有谁知道该怎么做?

The .NET class System.Security.Cryptography.X509Certificates.X509Extension does not support some X.509 extensions I want to parse (subject alternative name, name constraints). The MSDN page for this class states "Custom extensions can be registered in a CryptoConfig file" (link), but the description of the CryptoConfig class discusses only setting up custom cryptographic algorithm implementations -- it is not obvious how to register a custom X.509 extension.

Does anyone know how to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

爱你是孤单的心事 2024-09-14 06:54:21

如果您找不到内置类的解决方案,请查看我们的 SecureBlackbox 的 PKI 组件。它们让您可以轻松管理自定义扩展。

If you don't find a solution with the built-in class, take a look at our PKI components of SecureBlackbox. They let you manage custom extensions easily.

凉宸 2024-09-14 06:54:21
X509Certificate2 cert = new System.Security.Cryptography.X509Certificates.X509Certificate2(certByte);
string fn = cert.Extensions[0].Oid.FriendlyName;
string oid = cert.Extensions[0].Oid.Value;
string val = cert.Extensions[0].Format(true);
X509Certificate2 cert = new System.Security.Cryptography.X509Certificates.X509Certificate2(certByte);
string fn = cert.Extensions[0].Oid.FriendlyName;
string oid = cert.Extensions[0].Oid.Value;
string val = cert.Extensions[0].Format(true);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文