views:

660

answers:

2

I want to create certificates programmatically in C#.net which are signed by a CA. I was able to create a self signed certificate with CertCreateSelfSignCertificate as described here: http://msdn.microsoft.com/en-us/library/aa376039(VS.85).aspx http://stackoverflow.com/questions/187588/self-signed-certificate-in-windows-without-makecert

I was looking through the MSDN documentation and I can't seem to find a function to generate a certificate and sign it from a request. Most functions seem to be for manipulating the certificate store. Am I barking up the wrong dll here?

A: 

My tendency would be to try this with capicom.dll, first. It's basically a wrapper for cryptoapi.

Brian
A: 

I found the answer to this. I loaded up makecert.exe in a debugger and found it was using this call to create a signed certificate: CryptSignAndEncodeCertificate http://msdn.microsoft.com/en-us/library/aa380277(VS.85).aspx

Revision17