Andrew Arnott
Andrew Arnott

Reputation: 81791

How to programmatically create an X.509 certificate in .NET?

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.

Does anyone know how to do it?

Upvotes: 16

Views: 9734

Answers (1)

Vagaus
Vagaus

Reputation: 4215

The original blog post has vanished.

Luckily there are better ways to achieve the same goal now

Original answer

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

Best

Upvotes: 4

Related Questions