Fix bug in create_certificate.bat

This commit is contained in:
Itay Mizeretz 2017-12-19 18:02:43 +02:00
parent 1f2a0c0e21
commit 1f571503ad
1 changed files with 9 additions and 10 deletions

View File

@ -1,19 +1,18 @@
@echo off
SET OPENSSL_CONF=windows\openssl.cfg
IF [%1] == [] (
set dir=%cd%\
set mydir=%cd%\
) ELSE (
set dir=%1
REM - Remove double quotes -
set dir=%dir:"=%
set mydir=%~1%
)
echo Monkey Island folder: %dir%
echo Monkey Island folder: %mydir%
SET OPENSSL_CONF=%mydir%bin\openssl\openssl.cfg
copy "%mydir%windows\openssl.cfg" "%mydir%bin\openssl\openssl.cfg"
@echo on
"%dir%bin\openssl\openssl.exe" genrsa -out "%dir%cc\server.key" 1024
"%dir%bin\openssl\openssl.exe" req -new -config "%dir%bin\openssl\openssl.cfg" -key "%dir%cc\server.key" -out "%dir%cc\server.csr" -subj "/C=GB/ST=London/L=London/O=Global Security/OU=Monkey Department/CN=monkey.com"
"%dir%bin\openssl\openssl.exe" x509 -req -days 366 -in "%dir%cc\server.csr" -signkey "%dir%cc\server.key" -out "%dir%cc\server.crt"
"%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"