-
-
Save ifranco88/50c4b4a5a86613f09ad573c2dfe69619 to your computer and use it in GitHub Desktop.
XAMPP SSL Tutorial https://shellcreeper.com/?p=2573
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 | |
SETLOCAL EnableDelayedExpansion | |
set /p domain="Enter Domain: " | |
set OPENSSL_CONF=../conf/openssl.cnf | |
set tmp_cert_conf=cert_%domain%.conf | |
del %tmp_cert_conf% | |
for /f "delims=" %%x in (cert.conf) do ( | |
set "string=%%x" | |
set "modified=!string:{{DOMAIN}}=%domain%!" | |
echo !modified!>>"%tmp_cert_conf%" | |
) | |
if not exist .\%domain% mkdir .\%domain% | |
..\bin\openssl req -config %tmp_cert_conf% -new -sha256 -newkey rsa:2048 -nodes -keyout %domain%\server.key -x509 -days 365 -out %domain%\server.crt | |
del %tmp_cert_conf% | |
echo. | |
echo ----- | |
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
error