fix(tls): repair Windows certificate installer and verify trust

This commit is contained in:
dev
2026-10-22 17:56:31 +03:00
parent a55eff4004
commit 2385b37b92
4 changed files with 78 additions and 25 deletions
+18 -4
View File
@@ -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