1

I have a CSR (Certificate Signing Request) configuration file that I need to use to generate a CSR in C#. The configuration file specifies the details of the certificate that I want to request, such as the common name and subject alternative names.

I know that I can use OpenSSL to generate a CSR from a configuration file, but I'm not sure how to do this programmatically in C#. I've looked at the OpenSSL.NET library, but I'm not sure how to use it to generate a CSR.

Can someone provide an example of how to use OpenSSL or another library to generate a CSR in C# based on a configuration file? Ideally, I'd like to be able to specify the paths to the configuration file and the private key file, and then generate the CSR in a specified output file.

configuration file content

Genrate Certificate Signing Request based on configuration file I have and BouncyCastle lib

  • If you can't figure out bouncy castle, you could execute openssl commands from c# through command line. Here is example how to execute command line commands form c# https://stackoverflow.com/questions/1469764/run-command-prompt-commands – Arturs Mednis Feb 28 '23 at 00:10

0 Answers0