Skip to content

Instantly share code, notes, and snippets.

@turtlepod
Last active May 2, 2024 14:26
Show Gist options
  • Save turtlepod/e94928cddbfc46cfbaf8c3e5856577d0 to your computer and use it in GitHub Desktop.
Save turtlepod/e94928cddbfc46cfbaf8c3e5856577d0 to your computer and use it in GitHub Desktop.
@echo off
set /p domain="Enter Domain: "
set OPENSSL_CONF=../conf/openssl.cnf
if not exist .\%domain% mkdir .\%domain%
..\bin\openssl req -config cert.conf -new -sha256 -newkey rsa:2048 -nodes -keyout %domain%\server.key -x509 -days 3650 -out %domain%\server.crt
echo.
echo -----
echo The certificate was provided.
echo.
pause
@dimaslanjaka
Copy link

where cert.conf came from ?

@mindfulvector
Copy link

cert.conf is created in this article which the script is based on: https://shellcreeper.com/how-to-create-valid-ssl-in-localhost-for-xampp/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment