fix(tls): repair Windows certificate installer and verify trust
This commit is contained in:
@@ -1,10 +1,24 @@
|
||||
@echo off
|
||||
rem Installs the WhatIDo self-signed certificate into Trusted Root on Windows.
|
||||
rem Run as administrator (right-click - Run as administrator).
|
||||
rem Pass arguments through to the PowerShell script, e.g.:
|
||||
rem install-cert.cmd -StoreLocation CurrentUser
|
||||
rem install-cert.cmd -Uninstall
|
||||
rem The script requests administrator rights automatically (UAC) unless
|
||||
rem -StoreLocation CurrentUser is passed.
|
||||
rem Examples:
|
||||
rem install-whatido-cert.cmd
|
||||
rem install-whatido-cert.cmd -Uninstall
|
||||
rem install-whatido-cert.cmd -StoreLocation CurrentUser
|
||||
setlocal
|
||||
|
||||
set "ELEVATE=1"
|
||||
echo %* | findstr /I /C:"CurrentUser" >nul && set "ELEVATE=0"
|
||||
if "%ELEVATE%"=="1" (
|
||||
net session >nul 2>&1
|
||||
if errorlevel 1 (
|
||||
echo Requesting administrator privileges...
|
||||
powershell -NoProfile -Command "Start-Process -FilePath '%~f0' -ArgumentList '%*' -Verb RunAs"
|
||||
exit /b
|
||||
)
|
||||
)
|
||||
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0install-whatido-cert.ps1" %*
|
||||
echo.
|
||||
pause
|
||||
|
||||
Reference in New Issue
Block a user