Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@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 365 -out %domain%\server.crt
echo.
echo -----
echo The certificate was provided.
echo.
pause
@MastroBoy

This comment has been minimized.

Copy link

MastroBoy commented Oct 7, 2019

thank you! ;)

@abgrxenda

This comment has been minimized.

Copy link

abgrxenda commented Mar 25, 2020

hi, it failed,

it says "The system cannot find the path specified."

but it created the folder successfully

@emcoffey3

This comment has been minimized.

Copy link

emcoffey3 commented Apr 8, 2020

@abgrxenda I was having the same problem. It was running the batch file inside the system32 directory and creating the new directory there. To fix this, I added the following to the top of the batch file (right under @echo off):
cd %~dp0

@ali80

This comment has been minimized.

Copy link

ali80 commented Apr 11, 2020

It just worked, yes!

@bbdhaval

This comment has been minimized.

Copy link

bbdhaval commented May 28, 2020

Though everything was exactly same still I am receiving following error on latest firefox

Secure Connection Failed

An error occurred during a connection to www.shootdotedit.com. SSL received a record that exceeded the maximum permissible length.

Error code: SSL_ERROR_RX_RECORD_TOO_LONG

The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.
@av8er71

This comment has been minimized.

Copy link

av8er71 commented Aug 2, 2020

Dude! Thank you so much! I was searching everywhere for a fix for this. I couldn't create a key with openSSL using git bash and was losing my mind. This literally took me 5 minutes. You rock!

@airways

This comment has been minimized.

Copy link

airways commented Aug 2, 2020

Posted a revision for the current version of XAMPP: https://gist.github.com/airways/ae67310727ac394e5b3c12ba9f918962

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.