-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add SSL generation scripts for windows, #4
- Loading branch information
Showing
4 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@echo off | ||
|
||
:: set path | ||
SET PATH=%PATH%;C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64 | ||
|
||
echo generate root cert | ||
makecert.exe ^ | ||
-n "CN=CARoot" ^ | ||
-sr LocalMachine ^ | ||
-ss Root ^ | ||
-r ^ | ||
-pe ^ | ||
-a sha512 ^ | ||
-len 4096 ^ | ||
-cy authority ^ | ||
-sv CARoot.pvk ^ | ||
CARoot.cer | ||
|
||
:: convert pvk to pfx | ||
pvk2pfx.exe ^ | ||
-pvk CARoot.pvk ^ | ||
-spc CARoot.cer ^ | ||
-pfx CARoot.pfx ^ | ||
-po Test123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@echo off | ||
|
||
:: set path | ||
SET PATH=%PATH%;C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64 | ||
|
||
echo generate client cert | ||
makecert.exe ^ | ||
-n "CN=ClientCert" ^ | ||
-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 ClientCert.pvk ^ | ||
ClientCert.cer | ||
|
||
pvk2pfx.exe ^ | ||
-pvk ClientCert.pvk ^ | ||
-spc ClientCert.cer ^ | ||
-pfx ClientCert.pfx ^ | ||
-po Test123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@echo off | ||
|
||
:: set path | ||
SET PATH=%PATH%;C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64 | ||
|
||
:: short expiration incose this doesn't get updated for future security issues | ||
echo generate localhost server SSL cert | ||
makecert.exe ^ | ||
-n "CN=localhost" ^ | ||
-iv CARoot.pvk ^ | ||
-ic CARoot.cer ^ | ||
-sr CurrentUser ^ | ||
-ss My ^ | ||
-pe ^ | ||
-a sha512 ^ | ||
-len 4096 ^ | ||
-b 01/01/2018 ^ | ||
-e 01/01/2020 ^ | ||
-sky exchange ^ | ||
-eku 1.3.6.1.5.5.7.3.1 ^ | ||
-sv ServerSSL.pvk ^ | ||
ServerSSL.cer | ||
|
||
|
||
pvk2pfx.exe ^ | ||
-pvk ServerSSL.pvk ^ | ||
-spc ServerSSL.cer ^ | ||
-pfx ServerSSL.pfx ^ | ||
-po Test123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
|
||
CALL CreateCARoot.bat | ||
CALL CreateSslClientCert.bat | ||
CALL CreateSslServerCert.bat |