Skip to content

Commit

Permalink
Improved gencert.bat with PATH detection
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrumpis committed Feb 25, 2023
1 parent b3d539e commit 5d9b8ad
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
24 changes: 23 additions & 1 deletion gencert.bat
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
openssl req -x509 -nodes -days 3650 -subj "/C=CA/ST=QC/O=Snap Inc./CN=studio-app.snapchat.com" -addext "subjectAltName=DNS:studio-app.snapchat.com" -newkey rsa:2048 -keyout ./ssl/studio-app.snapchat.com.key -out ./ssl/studio-app.snapchat.com.crt
@echo off
IF EXIST "ssl\studio-app.snapchat.com.key" (
IF EXIST "ssl\studio-app.snapchat.com.crt" (
echo SSL certificate already exists.
exit
)
)
SET command=req -x509 -nodes -days 3650 -subj "/C=CA/ST=QC/O=Snap Inc./CN=studio-app.snapchat.com" -addext "subjectAltName=DNS:studio-app.snapchat.com" -newkey rsa:2048 -keyout ./ssl/studio-app.snapchat.com.key -out ./ssl/studio-app.snapchat.com.crt
WHERE openssl >nul 2>&1
IF %ERRORLEVEL% == 0 (
openssl %command%
) ELSE (
IF EXIST "%programfiles%\OpenSSL-Win64\bin\openssl.exe" (
"%programfiles%\OpenSSL-Win64\bin\openssl.exe" %command%
) ELSE (
IF EXIST "%programfiles(x86)%\OpenSSL-Win32\bin\openssl.exe" (
"%programfiles(x86)%\OpenSSL-Win32\bin\openssl.exe" %command%
) ELSE (
echo Error: OpenSSL could not be found on your system. Please download and install OpenSSL.
pause
)
)
)
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "snap-camera-server",
"version": "2.0.0",
"version": "2.0.6",
"description": "Host your own Snap Camera private server",
"keywords": [
"snapchat",
Expand All @@ -18,10 +18,10 @@
"author": "ptrumpis <[email protected]>",
"repository": {
"type": "git",
"url": "git+https://github.com/ptrumpis/SnapCameraPreservation.git"
"url": "git+https://github.com/ptrumpis/snap-camera-server.git"
},
"bugs": {
"url": "https://github.com/ptrumpis/SnapCameraPreservation/issues"
"url": "https://github.com/ptrumpis/snap-camera-server/issues"
},
"license": "MIT",
"dependencies": {
Expand Down

0 comments on commit 5d9b8ad

Please sign in to comment.