如何以编程方式创建.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.

有谁知道怎么办呢?

也许this帖子能有所帮助。我在我们的测试环境中创建自签名证书使用code。

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

最佳