creating certificate programmatically using cert authority
One of my company servers running Windows 2000 is hosting a Certificate Authority (microsoft based). When I open a web browser and type in http://server_name/certsrv, I get a page (titled Microsoft Certificate services) which allows me create a certificate request to this CA and get back a certificate which I then install in the certstore of the local PC.
I wish开发者_如何学编程 to to do this programmatically using C# because I need to generate a large number of certificates.
I have little idea what API I am looking for.
Any advice will be helpful.
Thanks in advance,
Subbu
As you have already discovered, judging by your more recent questions, you can use System.Security.Cryptography
and System.Security.Cryptography.X509Certificates
namespaces from standard .NET framework and also open source Bouncy Castle library. These are the API's you are looking for. Alternatively, you can use OpenSSL and invoke it from your .NET code, but I'd stick to pure .net solution.
Can you provide more information on your requirements?
Things like: Where are the private keys going to be generated? Will you be using a CSR from a remote host? What kind of output are you wanting:
For instance, will you be generating PKCS12 files holding both the private and the public portion, or only outputting the public and holding the private somewhere else?
精彩评论