diff --git a/gencert.bat b/gencert.bat index 41d4470..a36698b 100644 --- a/gencert.bat +++ b/gencert.bat @@ -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 \ No newline at end of file +@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 + ) + ) +) diff --git a/package.json b/package.json index 8c2fca4..e45a9eb 100644 --- a/package.json +++ b/package.json @@ -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", @@ -18,10 +18,10 @@ "author": "ptrumpis ", "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": {