Search code examples
.netsecuritycertificatex509certificate2

Create certificate for a client app in .NET


I'm looking for a server app to be routinely generating certificates for client applications using self-signed root. Is there any streamlined process in .NET to programmatically generate those certificates?

I can, of course, keep spawning makecert or openssl, but I was looking for more programmatic, in-memory method, when you just get X509Certificate on output.

If someone got a code snippet, can you please share?


Solution

  • Bouncycastle.org has a C# binding. It can create X509 certificates. This provider is widely used by java webapps.