Created
February 10, 2015 01:17
-
-
Save renesansz/ff6d555b3ef0605fcfbe to your computer and use it in GitHub Desktop.
Generate a self-signed SSL in XAMPP
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
@echo off | |
SET /P FILENAME=Enter file name:(Default: server) | |
IF "%FILENAME%"=="" SET FILENAME=server | |
@echo off | |
set OPENSSL_CONF=./conf/openssl.cnf | |
if not exist .\conf\ssl.crt mkdir .\conf\%FILENAME%.crt | |
if not exist .\conf\ssl.key mkdir .\conf\ssl.key | |
bin\openssl req -new -out %FILENAME%.csr | |
bin\openssl rsa -in privkey.pem -out %FILENAME%.key | |
bin\openssl x509 -in %FILENAME%.csr -out %FILENAME%.crt -req -signkey %FILENAME%.key -days 365 | |
set OPENSSL_CONF= | |
del .rnd | |
del privkey.pem | |
move /y %FILENAME%.crt .\conf\ssl.crt | |
move /y %FILENAME%.key .\conf\ssl.key | |
move /y %FILENAME%.csr .\conf\ssl.csr | |
echo. | |
echo ----- | |
echo Das Zertifikat wurde erstellt. | |
echo The certificate was provided. | |
echo. | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment