以编程方式生成 X.509(非自签名)客户端证书
是否可以在 ASP.NET 中即时生成客户端证书而不使用 makecert.exe?生成的证书应使用给定的 CA 证书进行签名(特定的 CA 证书保存在文件系统上并在运行时选择)。生成的证书应附加到对另一台服务器的 Web 请求中,以便提取数据。
流程:
用户在 IIS 上请求 ASP.NET 页面 ->证书是使用 ASP.NET 在 IIS 上生成的 ->调用附加证书的另一台服务器 ->返回数据并显示在用户请求的页面上。
我找不到通过 .NET Framework 进行本机操作的方法,并探索了不同的选项,例如:
- CertEnroll.dll - 此接口替换了旧的 IEnroll4 接口。似乎它只支持创建证书请求 - IX509Enrollment: http://msdn.microsoft.com/en-us/library/aa377809(v=VS.85).aspx
- Bouncy Castle - 一个我可能无法使用的开源项目(许可证问题)
提前感谢您的回复。
Is it possible to generate a client certificate on-the-fly in ASP.NET without using makecert.exe? the generated certificate should be signed with a given CA certificate (the specific CA certificate is saved on file system and selected at runtime). The generated certificate should be attached to a web request to another server in order to pull data.
The flow:
User asking for an ASP.NET page on IIS -> certificate is generated on IIS using ASP.NET -> calling another server with the certificate attached -> data is returned and is shown on the requested page for the user.
I couldn't find a way for doing natively through the .NET Framework and explored different options such as:
- CertEnroll.dll - This interface replaces the old IEnroll4 interface. It seems that it only supports a creation of a certificate request - IX509Enrollment: http://msdn.microsoft.com/en-us/library/aa377809(v=VS.85).aspx
- Bouncy Castle - An open source project which I might not be able to use (license issues)
Thanks in advance for your replies.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您还可以使用我们的 SecureBlackbox 组件的 PKIBlackbox 包。它们允许您生成证书,以及执行许多其他 PKI 功能。
You can also use PKIBlackbox package of our SecureBlackbox components. They let you generate certificates, as well as perform numerous other PKI functions.
使用 OpenSSL 怎么样? http://openssl-net.sourceforge.net/
How about using OpenSSL? http://openssl-net.sourceforge.net/