how to create a completely new x509Certificate2 in .net?

后端 未结 6 1769
忘了有多久
忘了有多久 2020-12-14 08:07

I google it from web, find many samples to generate a new x509Certificate2 from a file in .net, but there is no one sample to show how to generate a completely new x509Certi

6条回答
  •  自闭症患者
    2020-12-14 08:15

    I think you can't do it using that API. But you can create one using Bouncy Castle (http://www.bouncycastle.org) and later convert that object to a X509Certificate2 object (BC has some utility class for doing that).

    -edit- Take a look at these BC classes: X509V3CertificateGenerator and X509Certificate

    The BC utility class that later will convert a BC X509Certificate object to a regular X509Certificate2 object is: DotNetUtilities

提交回复
热议问题