Create a CSR in C# using an explicit RSA key-pair
- by rlandster
Using the OpenSSL libraries one can create a CSR (certificate signing request) by doing this:
openssl genrsa -out rsa.key 1024
openssl req -new -key rsa.key -out output.csr -config config.txt
where config.txt contains the distinguished name to use in the certificate.
I would like to do something similar under Windows using C#. However, the method createPKCS10 does not require you to supply an RSA key.
Is there a way to get C# to generate an explicit RSA private key and then use that private key to create the CSR?