2017-12-12 16:33:13 +08:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
IF [%1] == [] (
|
2017-12-20 00:02:43 +08:00
|
|
|
set mydir=%cd%\
|
2017-12-12 16:33:13 +08:00
|
|
|
) ELSE (
|
2017-12-20 00:02:43 +08:00
|
|
|
set mydir=%~1%
|
2017-12-12 16:33:13 +08:00
|
|
|
)
|
|
|
|
|
2017-12-20 00:02:43 +08:00
|
|
|
echo Monkey Island folder: %mydir%
|
|
|
|
|
|
|
|
SET OPENSSL_CONF=%mydir%bin\openssl\openssl.cfg
|
|
|
|
copy "%mydir%windows\openssl.cfg" "%mydir%bin\openssl\openssl.cfg"
|
2017-12-12 16:33:13 +08:00
|
|
|
|
|
|
|
@echo on
|
|
|
|
|
2017-12-20 00:02:43 +08:00
|
|
|
"%mydir%bin\openssl\openssl.exe" genrsa -out "%mydir%cc\server.key" 1024
|
|
|
|
"%mydir%bin\openssl\openssl.exe" req -new -config "%mydir%bin\openssl\openssl.cfg" -key "%mydir%cc\server.key" -out "%mydir%cc\server.csr" -subj "/C=GB/ST=London/L=London/O=Global Security/OU=Monkey Department/CN=monkey.com"
|
|
|
|
"%mydir%bin\openssl\openssl.exe" x509 -req -days 366 -in "%mydir%cc\server.csr" -signkey "%mydir%cc\server.key" -out "%mydir%cc\server.crt"
|