如何以编程方式创建.NET X.509证书? [英] How to programmatically create an X.509 certificate in .NET?

查看:149
本文介绍了如何以编程方式创建.NET X.509证书?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个新的X.509证书在.NET中,符合哈希算法和我设置的密钥长度的要求。这将是自签名证书。创建一个新的证书可能会创建一个新的密钥,或者我想导入现有的私钥,我在byte []的形式。

I'd like to create a new X.509 certificate in .NET, that meet the hash algorithm and key length requirements that I set. This will be a self-signed certificate. Creating a new certificate may create a new key, or perhaps I'd like to import an existing private key that I have in byte[] form.

有谁知道怎么办呢?

推荐答案

也许<一href="http://blogs.msdn.com/b/dcook/archive/2008/11/25/creating-a-self-signed-certificate-in-c.aspx">this帖子能有所帮助。我在我们的测试环境中创建自签名证书使用code。

Maybe this post can be helpful. I use this code in our test environment to create self signed certificates.

最佳

这篇关于如何以编程方式创建.NET X.509证书?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆