Link to home
Start Free TrialLog in
Avatar of ameenfusion
ameenfusionFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Create certificate with Subject Alternative name programmatically.

Hi Experts,

I want  to create certificate with .Net code and would like to add subject alternative name to it.

I want to use this certificate in production environment and distribute it to clients.

(not using makecert). I would appreciate if you could give me code using

system.security.cryptography namespace.

Thanks.
Avatar of dj_alik
dj_alik

by the way it's mono implementation
you can get all code and change some using

using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
see also antoher ways to do it
Creating a Self-Signed SSL Certificate without a mess of makecert.exe (using SSL Diagnostics Tool)
http://tcle.wordpress.com/2008/05/20/creating-a-self-signed-ssl-certificate-without-a-mess-of-makecertexe-using-ssl-diagnostics-tool/
Avatar of ameenfusion

ASKER

Thank you very much for your quick response.this code is used to geenrate a certificate with subject and validity with password but my requirement is to add Subject Altenative name(SAN) to the certificate. So my question is How can I add SAN code t o the existing code of creating a certificate?
ASKER CERTIFIED SOLUTION
Avatar of ameenfusion
ameenfusion
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This certificate is generated programmatically and it includes Subject Alternative name which was my requirement.