Skip to content

Instantly share code, notes, and snippets.

@LockTar
Last active January 9, 2017 07:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LockTar/826965a1f531b1fd3ead88d1d1a91fa6 to your computer and use it in GitHub Desktop.
Save LockTar/826965a1f531b1fd3ead88d1d1a91fa6 to your computer and use it in GitHub Desktop.
Create self signed certificates with makecert. Run the command in the Visual Studio Developer command prompt for direct access of makecert. Call the CreateCARoot.cmd first without any parameters. This will create a CARoot certificate. Call CreateSslServerCert.cmd with the name of the certificate als parameter. Like this CreateSslServerCert.cmd S…
makecert.exe ^
-n "CN=CARoot" ^
-r ^
-pe ^
-a sha512 ^
-len 4096 ^
-cy authority ^
-sv CARoot.pvk ^
CARoot.cer
pvk2pfx.exe ^
-pvk CARoot.pvk ^
-spc CARoot.cer ^
-pfx CARoot.pfx ^
-po Test123
makecert.exe ^
-n "CN=%1" ^
-iv CARoot.pvk ^
-ic CARoot.cer ^
-pe ^
-a sha512 ^
-len 4096 ^
-b 01/01/2014 ^
-e 01/01/2016 ^
-sky exchange ^
-eku 1.3.6.1.5.5.7.3.2 ^
-sv %1.pvk ^
%1.cer
pvk2pfx.exe ^
-pvk %1.pvk ^
-spc %1.cer ^
-pfx %1.pfx ^
-po Test123
makecert.exe ^
-n "CN=%1" ^
-iv CARoot.pvk ^
-ic CARoot.cer ^
-pe ^
-a sha512 ^
-len 4096 ^
-b 01/01/2014 ^
-e 01/01/2016 ^
-sky exchange ^
-eku 1.3.6.1.5.5.7.3.1 ^
-sv %1.pvk ^
%1.cer
pvk2pfx.exe ^
-pvk %1.pvk ^
-spc %1.cer ^
-pfx %1.pfx ^
-po Test123
@avanveelen
Copy link

How do I create a self signed wildcard certificate?
CreateSslServerCert.cmd *.mysite.local gives an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment