MySSL is a .NET library for creating self-signed certificates. It is useful in situations where you would like to serve a local web application over SSL.
Using Nuget
Install-Package MySSL
- Create a certificate authority
var authority = new CertificateAuthority("MyAuthority").ToX509Certificate();
- Create an SSL certificate from the authority for localhost
var sslCert = authority.CreateSsl();
- Install the certificates
var certStore = new CertificateStore(); certStore.SaveAuthority(authority); certStore.SaveSsl(sslCert);
var certStore = new CertificateStore(); certStore.Remove("MyAuthority"); // MyAuthority is the name of the authority