How to create a local SSL certificate in Windows?

Asked

Viewed 3,316 times

1

How can I create a local SSL certificate in Windows?

  • Have a look here https://weblogs.asp.net/scottgu/tip-trick-enabling-ssl-on-iis7-using-self-signed-certificates

1 answer

3


You can create a certificate in the following ways:

Powershell (Windows 10 and Server 2016):

  1. Open the Powershell;
  2. Use the command New-SelfSignedCertificate -DnsName "endereço do seu site", "outro endereço do seu site" -CertStoreLocation "cert:\LocalMachine\My" to create your certificate;

makecert:

  1. Download the makecert;
  2. After installing, open the command line;
  3. Use the command makecert -r -pe -ss my -sr CurrentUser -n "CN=NomeDoSeuSite" -sv "NomeDaChavePrivadaDoSeuCertificado.pvk" NomeDaChavePublicaDoSeuCertificado.cer

Explanation of options:

-r // cria um certificado assinado por si
-pe // marca a chave privada como exportável
-ss my // Nome da *store* onde o certificado vai ser colocado
-sr CurrentUser // Localização da *store*
-n "CN=NomeDoSeuSite" // Nomes no certificado 
-sv "NomeDaChavePrivadaDoSeuCertificado.pvk"

(More examples here).


  • Just remember. Open powerrshell as administrator to avoid errors

Browser other questions tagged

You are not signed in. Login or sign up in order to post.