Create a CSR in C# using an explicit RSA key-pair

Posted by rlandster on Stack Overflow See other posts from Stack Overflow or by rlandster
Published on 2010-06-01T20:29:09Z Indexed on 2010/06/01 22:23 UTC
Read the original article Hit count: 267

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about c#

Related posts about Windows